AnsweredAssumed Answered

Can I save PDFs of Subassemby/Component Drawings With Only the Main Assembly Drawing Open?

Question asked by Keaton Warn on Jun 26, 2018
Latest reply on Jun 27, 2018 by Keaton Warn

Is it possible to open a main assembly drawing and then run a macro that saves it as a PDF, but also finds all of the sub-assembly and component drawings and saves those as PDFs as well? I've been looking up posts, googling, and trying out code all afternoon but have had no luck.

 

The closest I got was last week when I started trying to write this macro. I made a dynamic array of the file names contained in the assembly and a loop that went through the array and saved a PDF under each name, but the differently-named PDF files themselves were all of the main assembly since that was the open document. I've tried finding a way to access these sub-assembly/parts to save as PDFs but have had no luck. Optimally they wouldn't be opened in a window in SolidWorks (just in memory) so as to improve performance and not clutter up the user's SolidWorks window every time the macro is run.

 

Thank you to all of the guys who have helped me with macros so far - your help has been appreciated!

Outcomes