Solidworks instant PDF, STL, DXF macro’s

Screen shot 2013-09-20 at 11.13.37

 

These macro’s save a PDF, DXF or AI version of a drawing or STL of a model with the name of the model, in the model folder. Saves tons of time making packages of technical drawings. One-click file-saving! Can be easily changed to save other formats (STEP, IGES, …)
Warning: automatically overwrites existing files!

Download the ZIP package! (33k)

Chrome users: this download link is blocked – copy the link address and paste it manually in the address bar. Then select “Keep” on the “Insecure download blocked”-popup. If you’re curious: you can inspect the source code before using or installing to see they don’t do anything malicious.

Update 1-2-2016: Since I’m still getting a ton of traffic on this post; I recently tested them with SolidWorks 2016 and they work perfectly.

Update 27-10-2024: more than 10 years and still going strong. Tested with SW 2021 and 2024.

BTW: If you want to make other macro’s for different file types: just open the macro, edit the extension at the end of the macro (“stl”) and SolidWorks will do the rest. Also changing the output folder to a fixed ‘export’ folder (not relative to the file) is easy – change the folder to a fixed path.

 




Like this? You might be interested in my latest project. It's a desk light made completely from a single sheet of printed circuit board. Check it out:


vlak-1

16 thoughts on “Solidworks instant PDF, STL, DXF macro’s

    • Not sure, but probably, yeah. I’m on 2008, so no 64bit back then (I think). Let me know if it does 🙂

      • Hi, i have checked stl and pdf on 64-bit system (SWX2014) – it runs good… 😀
        nice macro – thanx

  1. Hi,

    Thanks for sharing these macros. I’m new to using macros and these are working great for me.

    Well I’d like to know that How can I use one of these Macros (say PDF) in Solidworks Task Scheduler to automatically save all the drawing files located in a folder to PDF files in the same folder.

    Your help is appreciated.

    Many thanks in advance!

    Best Regards
    Ashish Sharma

    • Hi Ashish,

      Good idea. However, I didn’t even know SW had a task scheduler 😀
      I’d guess you could feed this macro into the scheduler, but if I remember correctly it only saves a PDF of the currently opened and active file so you might have some trouble with that.

      Best regards, Gregor

  2. Hi,
    Thank you for sharing these macros.
    I was having trouble with the one I wrote crashing solidworks when I used it.
    Makes everything a lot easier

  3. Hey,
    thanks for the macros.

    -is it possible to make the .stl macro where i can choose the folder where i can save my file?

    -the dxf macro is very nice but it only works on drawing file. can you also make it for a sketch file? i need it for sheet-exhaus transaction

    nice greetz from germany

  4. Hello Gregor!
    Nice scripts you have here, thank you for that!
    But I cant get the DXF macro to work, it just dont save any file?
    The STL macro works and PDF too.

    Also, is it possible to save only the current faces?

    Regards / Johan.

    • Hi Johan,
      Thanks. Which version of SW are you using? I’m (stuck) on 2021. The DXF macro was meant to be used on drawings, not parts btw.
      ‘Current faces’ might be possible: this macro reuses the last used settings when you manually ‘Saved as’ a file. So if you select ‘current faces’ in the ‘Save’ options dialog, this might work. Hope this helps.
      -G

Leave a Reply

Your email address will not be published. Required fields are marked *