Macro library
A library of SOLIDWORKS macros, ready to download.
Every macro here is plain SOLIDWORKS VBA in a .swp file. Each one runs on its own
in the VBA editor, and runs across a whole folder unattended inside
SwMacroFlow. Open a macro to read its notes, or take the file directly.
- 16 macros
- 4 groups
- Free and MIT licensed
16 macros
-
Utility .swp - download Change Document Unit.swp
Change Document Unit
Sets the document's unit system and the individual length, angle, mass, volume, time, force, power and energy units. Optionally switches inch dimensions to fractions.
PRT PartsASM AssembliesDRW Drawings
-
Drawing .swp - download Change Drawing Template.swp
Change Drawing Template
Applies a .slddrt sheet format to one sheet, several named sheets, or every sheet in a drawing, then rebuilds and saves.
DRW Drawings
-
Properties .swp - download Export Properties to CSV.swp
Export Properties to CSV
Appends every custom property of each document to one CSV. A folder of 300 files produces one spreadsheet, not 300. Works on parts, assemblies and drawings.
PRT PartsASM AssembliesDRW Drawings
-
Properties .swp - download Find and Replace in Properties.swp
Find and Replace in Properties
Replaces text inside custom property values across many files. Works on parts, assemblies and drawings.
PRT PartsASM AssembliesDRW Drawings
-
Properties .swp - download Import Properties from CSV.swp
Import Properties from CSV
Writes custom properties into documents from a spreadsheet. Reads the long-format CSV that Export Properties to CSV writes, picks the rows belonging to each document, and writes them.
PRT PartsASM AssembliesDRW Drawings
-
Drawing .swp - download Insert Block In Drawings.swp
Insert Block In Drawings
Inserts a .sldblk sketch block at a fixed position on one sheet, several named sheets, or every sheet in a drawing, then rebuilds and saves.
DRW Drawings
-
Properties .swp - download Rename Custom Property.swp
Rename Custom Property
Renames a custom property across many files. Works on parts, assemblies and drawings.
PRT PartsASM AssembliesDRW Drawings
-
Export .swp - download Save Drawing as DXF or DWG.swp
Save Drawing as DXF or DWG
Exports the open drawing to DXF or DWG. Parts and assemblies are reported as unsupported — use Save Neutral Format for those.
DRW Drawings
-
Export .swp - download Save eDrawings.swp
Save eDrawings
Exports the open document as an eDrawings file, for sending to people who do not have SOLIDWORKS.
PRT PartsASM AssembliesDRW Drawings
-
Export .swp - download Save Neutral Format.swp
Save Neutral Format
Exports the open part or assembly to Parasolid, IGES, STL, ACIS or 3D XML. Drawings are reported as unsupported.
PRT PartsASM Assemblies
-
Export .swp - download Save PDF.swp
Save PDF
Exports the open document to PDF. Works on parts, assemblies and drawings.
PRT PartsASM AssembliesDRW Drawings
-
Export .swp - download Save Preview Image.swp
Save Preview Image
Captures a bitmap of the open document. Works on parts, assemblies and drawings — on a drawing it captures the active sheet.
PRT PartsASM AssembliesDRW Drawings
-
Export .swp - download Save STEP.swp
Save STEP
Exports the open part or assembly to a STEP file. Drawings are reported as unsupported.
PRT PartsASM Assemblies
-
Utility .swp - download Save with Performance Improvement.swp
Save with Performance Improvement
Turns image quality down to its cheapest settings — shaded deviation at maximum, high-quality edges off, wireframe quality at its lowest — then saves a copy named <name>_Optimized.
PRT PartsASM AssembliesDRW Drawings
-
Properties .swp - download Set Custom Property.swp
Set Custom Property
Writes one custom property across every file in the scope. Works on parts, assemblies and drawings.
PRT PartsASM AssembliesDRW Drawings
-
Properties .swp - download Write Mass Properties.swp
Write Mass Properties
Measures the model and writes mass, volume, surface area and centre of mass into custom properties, so a BOM or a drawing note can read them. Parts and assemblies only — drawings have no geometry to...
PRT PartsASM Assemblies
Put the downloaded file in this folder, then open SwMacroFlow and choose it from the library.
%LOCALAPPDATA%\SwMacroFlow\macros