ds-blue-logo
Preview  |  SOLIDWORKS USER FORUM
Use your SOLIDWORKS ID or 3DEXPERIENCE ID to log in.
BCBrandon Clark19/03/2019

I've been tweaking my macro for exporting as an STL for 3D printing for a while, and I just wanted to share it here:

' Macro to save the active part/assembly as an STL file

'

' * The current configuration name is added on to the end of the file name

' * If there is a coordinate system titled "3DPrint", then it will output the STL in that orientation

' * It will copy the full path and file name to the clipboard for ease of opening in the slicing software

' - Must have "Microsoft Forms 2.0 Object Library" (c:\windows\system32\FM20.dll) enabled in VBA "Tools" "References"

' * If a body or a surface is pre-selected, then only that will be exported. Otherwise, all bodies are exported.

Some help from:

ref: https://forum.solidworks.com/thread/74865

ref: https://forum.solidworks.com/thread/200259