3 Replies Latest reply on Nov 19, 2013 5:20 PM by John Peros

    How can I export to PDF while retaining a sub-folder structure and appending part titles?

    Peter Johnson

      Hello all,

       

      I know task schedular allows the automatic export of pdf files from drawings, but has anyone created a macro in order to export all pdfs in a directory (and subdirectories), append the files with the part title (which appears in the description box of the drawing), and then place the pdf in a different folder but still retain the original sub-directory layout?  It would be most useful if everytime I saved the drawing it also saved a copy of the pdf using this methodology.

       

      This way others on the network could browse the directory for parts and see the part description as well.

       

      Unfortunately I don't know how to write macros, but perhaps someone has written one that already does this or similar?  If the same script could also check the parts for sheet metal and export the dxf to the same location that would be great.

        • Re: How can I export to PDF while retaining a sub-folder structure and appending part titles?
          John Peros

          Hey Peter,

          There might be some stuff out there butI have a couple of questions for clarity:

           

          1) For the subdirectories, are you looking for all sub-directories to be re-created or just sub-directories that have drawings that were converted?

           

          2) Are these new folders inside your vault or outside your vault?

           

          3) Why don't you want the PDFs in the same folder as their drawings?

           

          4) When you talk about appending the "part title" to the name of the PDF, are you referring to the FileName of the part or some property of the part like description?  If a property, does that property exist in the drawing or only in the part?

           

          5) What if a drawing has multiple part files on either the same sheet or multiple sheets.  Which part title would you want to choose?

           

          Thanks,

          John

            • Re: How can I export to PDF while retaining a sub-folder structure and appending part titles?
              Peter Johnson

              Hi John, thanks for the reply.  To answer your questions:

               

              1)  I only need subdirectories that contain converted drawings to be recreated.

               

              2) Actually nothing is in the vault, all created parts are on a local server.

               

              3)  I'd like the pdfs to be in a seperate folders essentially to make it easier for others to browse finallized part drawings without having access to the CAD files.  This comes as both a benifit for organizing and simplicity.  Our company is very small and those who are unfamiliar with CAD files have gotten confused, (I'm trying to make their life easier, even if I just desire that they sort the files by file type).  That's also why I would like to preserve the folder substructure, it simply automates the organization process. 

               

              4)  I'm refering the part property of description, so it would only exist in the part, but it is linked to the drawing through the title block.

               

              5) Any drawings containing multiple parts will be assemblies, and would then contain the description attached to the assembly file.  But as a failsafe the macro could point to the first sheet and first view.

               

              I mainly want to streamline the data convertion process when we prepare drawings from parts for both manufacturing operations and office reference.  The tasks by themselves are simple (a few clicks to export to pdf, and dxf if sheetmetal, a few clicks to move or designate the output location, ect.) but over time the work gets quite tedious and can -in the long run- consume quite a bit of time.

               

              Even if there existed some software that could do it I would be happy if anyone knew of anything that was able to do everything I listed.

               

              Thanks,
              Peter

                • Re: How can I export to PDF while retaining a sub-folder structure and appending part titles?
                  John Peros

                  Thanks Peter,

                  I am not aware of anything out there that already does exactly what you are looking for however check out the printing feature and associated video here as this seems to meet some of your needs:

                   

                  http://customtools.info/features

                   

                   

                  The real difficulty in doing what you are looking for is appending the part description to the name of the PDF however the drawing (and therefore part) would have to be open in SWX to create the PDF so its entirely possible something could be written to accomodate exactly what you are looking for.  I'll show this to our programmers and see what they think but I'm guessing it would be more complicated than a macro and would need to be some type of standalone application.  Would you want it to run on a directory in windows explorer, on a Solidworks assembly in windows explorer or on a Solidworks assembly from inside SolidWorks?