.swp macro

Change Document Unit: set SOLIDWORKS units in bulk

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.

Utility

PRT PartsASM AssembliesDRW Drawings

Download Change Document Unit.swp Get SwMacroFlow

Put the downloaded file in this folder, then open SwMacroFlow and choose it from the library.

%LOCALAPPDATA%\SwMacroFlow\macros

Runs per file, on parts, assemblies and drawings.

Inputs

FieldPurpose
UnitSystemMMGS, IPS, MKS, CGS or Custom.
LengthUnitLength unit for the document.
DualLengthUnitLength unit for dual dimensions.
AngleUnitdegrees, deg/min, deg/min/sec or radians.

Only read when UnitSystem is Custom

FieldPurpose
CustomLength / CustomMass / CustomVolumeCustom system base units.
CustomTime / CustomForce / CustomPower / CustomEnergyThe rest of the custom system.

Fractions — only apply to IPS, or a Custom system using inches

FieldPurpose
UseFractionsShow inch dimensions as fractions.
DenominatorSmallest fraction to show: 2, 4, 8, 16, 32 or 64.
RoundFractionsRound to the nearest fraction rather than showing a remainder.

Results

Reports the unit system and length unit that were applied, or the first unit name it could not recognise.