AnsweredAssumed Answered

Solidworks API; Export to PDF

Question asked by Joe McGrath on May 22, 2020
Latest reply on May 24, 2020 by Joe McGrath

Hello,

 

The designer has asked for a way to batch convert collections of Solidworks files into PDF on file change.  Using the eDrawings API and a PDF printer I managed to get it to work, although a little clunky due to using SendKeys to nav through the printer dialog, which I can't get to work silently, no matter the SetPageSetupOptions or drivers (Adobe PDF) settings.

 

Reading through the Solidworks API documents, there is a method for exporting to PDF, but it requires  SolidWorks.Interop.sldworks.SldWorks to be instantiated which I'm guessing is an installed Solidworks application.  The GUID error on compile seems to say so.  Is this assumption correct?

 

I was going to run this utility as a service on one of our servers and have it fire on file change, not the actual Solidworks workstation.  Probably going to be a licensing issue in this case.

 

Thanks for your input.

Outcomes