Export macro

SOLIDWORKS Macro: Export Drawing to PDF, DXF/DWG and STEP

Exports the active drawing to PDF, DXF and DWG, then exports the first referenced model to STEP with filename parts from custom properties.

DrawingPDFDXFDWGSTEPIntermediate

What this macro does

Exports the active drawing to PDF, DXF and DWG, then exports the first referenced model to STEP with filename parts from custom properties.

Best for

  • Release packs
  • Supplier handoff
  • Revision-controlled exports
  • One-click drawing deliverables

Inputs

  • Open .SLDDRW drawing
  • Referenced part or assembly
  • Optional PartNo, Revision and Description custom properties

Outputs

PDF, DXF, DWG, STEP

Filename rules

{PartNo}_{Revision}_{Description}; falls back to the drawing filename when properties are missing.

How to use

  1. Test on copied SOLIDWORKS files first.
  2. Download and import ExportDrawingPdfDxfStep.bas into a SOLIDWORKS VBA macro project.
  3. Open the required document type: Drawing.
  4. Run main from the macro editor or assign it to a toolbar button.
  5. Review all generated files before using them for production release.

Limitations

  • Only the active drawing is processed.
  • The STEP file is exported from the first referenced model found in the drawing.
  • DXF/DWG output depends on SOLIDWORKS drawing export settings.

When macros become a workflow

Use Solidise for indexed folders, BOM visibility, where-used search and repeatable batch export.

Use this macro for a focused task. Use Solidise when you need repeatable export, BOM review, previews or where-used context across many files.

Visit Solidise

Related macros

Keep automating this workflow