1 Reply Latest reply on Apr 19, 2018 1:08 PM by Alex Burnett

    Collecting (copying) PDF and DXF files from an assembly in to one folder.

    Wojciech Pogorzelski

      Hi everybody,

       

      I’m looking for a macro that would collect (make a copy of) all the drawings and sheet metal files that I have created and saved as *.pdf and *.dxf file format into one folder from an open assembly file. Folder to be created prior to collection.

      The assembly file usually contains subassemblies as well as single part files, and the same part files are being used in different subassemblies, eg.:

      1. Assembly:
        1. Subassembly 1
          1. Part 1.1
          2. Part 1.2
          3. Part 1.3
        2. Subassembly 2
          1. Part 2.1
          2. Part 2.2
          3. Part 2.3
          4. Part 1.2
        3. Subassembly 3
          1. Subassembly 3.1
            1. Part 3.1.1
            2. Part 3.1.2
            3. Part 1.1
          2. Part 3.1
          3. Part 3.2
        4. Part 1
        5. Part 2
        6. Part 3

       

      Both PDF and DXF files have the same file name as parts and assemblies and they are located in the same folder as parts and assemblies files, e.g.:

      • Assembly 5.SLDASM & Assembly 5.SLDDRW & Assembly 5.PDF are in the same folder
      • Part 2.SLDPRT & Part 2.SLDDRW & Part 2.PDF & Part 2.DXF are in the same folder

      but the location of every part or assembly file (as well as corresponding drawings, PDF and DXF files) might be in different folders on hard drive e.g.:

      • Assembly 5 = c:/SW/1/2/3/
      • Assembly 3 = c:/SW/1/2/4/8/
      • Part 2 = c:/SW/4/2/
      • Part 3 = c:/SW/51/2/3/34/
      • Part 8 = c:/SW/1/2/3/
      • end so on…

      One last note, not all the parts/assemblies have their corresponding PDF/DXF files – those are 3D models of OEM components.

      Also I don't need to create new PDF nor DXF files from the assembly. I have those already, just need to collect them.

       

      Long story short. I have a big assembly containing a lot of subassemblies and parts open in SW. I have all the blueprints ready and saved as PDF files and all the sheet metal saved as DXF files. Time to send the jobs out. In order to do so I have to find every PDF and DXF file an make a copy of it in one folder. This part consumes a lot of time and it would be awesome to automate it.