You need to be logged in to view this content. Please login or become a member.


  1. j.henke

    is there any solution to switch of “view pdf after saving” via API?

  2. James

    HI Keith
    Is it possible to change and use the SW-File Name instead of “export”

    • You’ll need to use IModelDoc2::GetTitle, or maybe IModelDoc2::GetPathName and parse out the file name. Search in the search bar at the bottom for “GetTitle” or “GetPathName” to see examples. There should be some free examples that show you how to use these. Or you can look in the API Help.

  3. anandhd

    Hi Keith,

    Is it possible to have a single PDF for several drawing files located in a single folder?

    • You could only create a single PDF by taking all of the individual PDFs and merging them into one. There is no option in SolidWorks or the SolidWorks API to do exactly what you’re describing.

  4. ericborst

    Hi. Could you tell me how this is different from using the SaveAs3 :

    longstatus = swDraw.SaveAs3(“C:\” + Name + “.PDF”, 0, 0)

    This call works and saves all sheets to a pdf in one go, creating bookmarks for all views

    • IModelDocExtension::SaveAs is a newer API call that gives you more options that IDrawingDoc::SaveAs3. The latter should still work fine, though, as you discovered. If you find that it is simpler to use and suits your purposes, there’s nothing wrong with using it.

  5. Suryavanshi

    Hi keith,
    Is there a way that the macro will ask where do i want to save the pdf, I Dont want to save it in the same location every time i run the code.

Questions and Comments

You must be logged in to post a comment.