Outputting SOLIDWORKS files to different formats using SOLIDWORKS eDrawings API

Edit ArticleEdit Article

eDrawings enables exporting of the SOLIDWORKS files to the foreign format listed below:

Export types in eDrawings
Export types in eDrawings

Export can be performed via IEModelViewControl::Save eDrawings API method.

In addition to the above opened file can be printed via IEModelViewControl::Print5 eDrawings API method.

Both the exporting and printing APIs are asynchronous. It is required to track the corresponding finish events to find when the process is completed. Use the OnFinishedPrintingDocument and OnFinishedSavingDocument for tracking the finishing of printing and saving respectively.

The finish events will not be sent in case of an error. In this scenario it is required to handle the OnFailedSavingDocument and OnFailedPrintingDocument events.


All articles and code at CodeStack are now open-source and hosted on GitHub. If you want to contribute by modifying existing articles and code snippets, submitting new ones, reporting errors and bugs etc. please follow this blog post for more information. We appreciate any contribution.

Product of Xarial Product of Xarial