2 Replies Latest reply on May 17, 2016 7:45 PM by Thomas Crugnale

    Create PDF File Totally Silently

    Darren Smith

      Can  anybody help????


      I need a SolidWorks VBA macro that can create a PDF file, from a SolidWorks drawing, "Totally Silently"


      For Example,


      Say I have an existing SolidWorks drawing called "C:\Test.slddrw".


      By running the macro I need to create a Pdf file of the drawing TOTALLY silently, that is, without opening the drawing firstly.


      The output file would be called "C:\Test.Pdf"


      Can this be done using a SolidWorks Macro?


      Many thanks in advance!!!!



        • Re: Create PDF File Totally Silently
          Viktor Bovzdarenko

          Hi Darren

          You can do some operations with SolidWorks files without opening only through document manager. Unfortunately, document manager do not have an api to save documents.

          You can silently save document by opening a session of SolidWorks and turn the visibility off: ISldWorks.Visible = False. This will be a bit faster than opening the document and sawing it; but still time consuming since all data need to be loaded.

          Another way is triger save as PDF for your current document on some events like saving.

          Hope this helps


          • Re: Create PDF File Totally Silently
            Thomas Crugnale

            Hi Darren,


            Sorry if this does not answer your question directly.

            Rather than using API, you may be able to use the Solidworks task scheduler.


            1. Open task scheduler

            2. Select export files

            3. Select Add folder and add folder containing drawings

            4. Set time to run task


            Technically, this does open files, but may be worth investigating if you can run it after hours.