Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations MintJulep on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

PDF Macro

Status
Not open for further replies.

pdybeck

Mechanical
May 14, 2003
599
I'm asking to see if anyone has or knows of a bulk PDF macro out there for saving SolidWorks drawings as pdf documents. Ideally the macro would "save as" pdf for all drawings in a folder. I would like to use SolidWorks task scheduler to run the macro at an off peak time. TIA.

Pete
 
Replies continue below

Recommended for you

If you find a macro, also make sure the page setups for each dwg are as you want them or you can get unwanted PDF results.
 
Apparently you can do this with the Task Scheduler in combination with the full Bluebeam PDF - you just do a "Print Files" and then print to the BlueBeam PDF Printer.

You could probably do the same thing with a free PDF printer (i.e. CutePDF) if you can set it to save the PDF files all to a single location silently - this may require some research on ghostscript parameters.
 
I use one that does the files on a singular basis. The macro saves the open drawing first, then deletes all pages except for the first sheet, it then deletes several unwanted notes from the first sheet, rebuilds the drawing, saves the pdf with the same name as the drawing into a different directory and the closes the file without saving the edits it made before creating the PDF file. Reason I needed to do all this is because our electrical group uses one page PDF's, mechanical uses one page DXF's with added information from a database. The mech group uses the additional pages for design notes, plus we put a digital signature on the first sheet in a spot that gets covered by our database when it adds a BOM to the DXF.
 
Alternate approach is to use the API to save as PDF using the "SaveAs4" method of ModelDoc or DrawingDoc:

Model.SaveAs4("D:\samples\d1.pdf", 0, 0, e, w)

You have to work out some type of routine to loop through every document in the folder, maybe using DIR or GETATTR (don't remember what it is exactly). You would then have to open the document silently, save it as a PDF, and close it.

You could create this as an executable (if you have VB) then schedule it.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor