1 Reply Latest reply on Aug 26, 2012 11:23 PM by Keith Rice

    Using Pack And Go in The Vault

    Julien D'Alessio-Doucet



      I have no experience with VBA and very little programming experience in total. However, I know this can be done just not completely sure how. I'm looking for help or directions or resources on how to take a text file filed with information on part names and folder names and pack and go the files while renaming them. The folders are already created and properly structured.


      An example of a file and its directory would be. C:\Vault\MRO02000-02999\MRO02875 MS201056702\MANUFACTURING INFORMATION\MRO02875-MS201056702-PROC.SLDDRW.


      This file and the files which it is dependent which are other drawings and parts which have been inserted on after the other. So MRO02875-MS201056702-OP1 has been inserted into MRO02875-MS201056702-OP2 which has been inserted into MRO02875-MS201056702-OP3 which has been inserted into MRO02875-MS201056702-PROC and all of them have drawings. There can be up to 4 OPs and can or can't have a PROC.


      I want to take all of those files and move and rename them to C:\Vault\AS3000-3999\AS3182 201056702\MANUFACTURING INFORMATION. My text file with all the information is structured as such:


      MS201056702     MRO02875     2875     201056702     AS3182    




      I'm unsure how to load a text file into VBA and run loops again I have no experience. Also all the actions which I want to take place can be manually done with pack and go by checking include drawings and replacing save to name.


      I have the example pack and go code which I'm trying to understand but I lack the resources and knowledge. Any help would be greatly appreciated.

        • Re: Using Pack And Go in The Vault
          Keith Rice



          If you want to learn basic VBA within the SolidWorks environment, the free content at CADSharp.com should help.


          I don't know how many, or if any, VBA examples exist for EPDM.  So you may have to translate them from VB.NET (which isn't very hard).  The official EPDM API manual uses VB.NET.  Heads up though, not every single EPDM interface appears to work in 2011, though most do.  See this thread.


          Should you decide to go the VBA right, you will want to learn how to use the File System Object to read text files.  Google it---there are lots of code samples.  The premium membership videos at CADSharp.com also cover the FSO, however, like Lesson 1.10 and 6.3.


          If you want to learn some basic EPDM API, then check out Mike Spens' SolidWorks World 2012 presentation called "Introduction to the SolidWorks Enterprise PDM API".  You can get to it here.


          Hope this helps,


          Video Tutorials for the SolidWorks API