Automate SOLIDWORKS assemblies, mates, BOM and interference checks
Assembly automation without fragile UI clicks. Insert parts, inspect constrained status, mate datums or persistent faces, audit interference volumes and component pairs, diff two assembly states, and extract a flat bill of materials in JSON.
10 of the 92 verbs · Windows x64 · Late-bound SOLIDWORKS COM API
solid components [--file FILE] [--expect FILE] [--pid N] [--digest]- Top-level components of the active assembly: name, path, configuration, suppressed, and for an unsuppressed one fixed and defined
solid insert-component --file FILE [--at x,y,z] [--float] [--fix] [--config NAME] [--flexible] [--expect FILE] [--pid N]- Adds the part or assembly FILE (read from anywhere) to the active assembly with IAssemblyDoc::AddComponent5, moves the component's origin to --at
solid move-component --component NAME [--at x,y,z] [--float] [--expect FILE] [--pid N] [--confirm]- Moves a top-level component of the active assembly
solid mates [--detail] [--component NAME] [--ref-type plane|face|edge] [--file FILE] [--expect FILE] [--pid N] [--digest]- Mates of the active assembly
solid mate --a COMP:REF --b COMP:REF --type coincident|parallel|perpendicular|distance|concentric|angle|gear|cam [--distance MM] [--angle DEG] [--ratio N:M] [--min V --max V] [--align aligned|anti|closest] [--flip] [--hold] [--name N] [--expect FILE] [--pid N] [--confirm]- One mate between two datums of two components of the active assembly
solid delete-mate --name MATE [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Deletes one mate of the active assembly, found by its name in
mates(only it: DeleteSelection2 options 0 on the mate feature) solid bom [--file FILE] [--expect FILE] [--pid N] [--digest]- Flat bill of materials of the active assembly, or of the assembly an active drawing shows: path, configuration, quantity (suppressed excluded)
solid review [--file FILE] [--expect FILE] [--pid N] [--digest]- The whole assembly review in one call: counts first (mates, interferences, interferingPairs), then components (path, configuration, suppressed, bbox mm, massKg, material, materialAssigned), envelope, mass total, mates summary
solid interference [--limit N] [--detail] [--faces-all] [--file FILE] [--expect FILE] [--pid N] [--digest]- Interfering top-level component pairs of the active assembly
solid asm-diff --a ASM --b ASM|@active [--interference] [--pid N]- Read-only diff of two assembly files
Common questions
How do I insert parts and create mates in a SOLIDWORKS assembly by command?
solid insert-component adds a part or subassembly at a given position, solid move-component positions or floats it, and solid mate creates coincident, parallel, perpendicular, distance, concentric, angle, gear or cam mates using datum or face selectors.
Can SolidWorks-CLI check assembly interference and compare two revisions?
Yes. solid review summarizes components, mates, mass and interference in one call, solid interference reports leaf and pair overlap volumes, solid bom extracts a flat bill of materials, and solid asm-diff compares two assembly files.
Run these verbs on your own SOLIDWORKS models
Every verb above returns structured JSON and takes plain command-line flags. SolidWorks-CLI is local and on-premise: zero UAC elevation, zero SOLIDWORKS interop DLLs
redistributed, and every write is a dry run until you pass --apply. Fourteen-day free trial
with corporate e-mail, no card.
Other verb families
- Open, create, save and sandbox SOLIDWORKS files from the command line13 verbs
- Inspect SOLIDWORKS feature trees, dimensions, mass, holes and configurations15 verbs
- Create, read, constrain and edit 2D SOLIDWORKS sketches by command10 verbs
- Build and edit 3D SOLIDWORKS part features, datums and materials17 verbs
- Generate SOLIDWORKS drawings, section views, hole callouts and CAD exports7 verbs
- Validate, inspect and transactionally build SOLIDWORKS specs from JSON5 verbs
- Address SOLIDWORKS faces and edges by persistent reference and inspect COM APIs7 verbs
- Check SOLIDWORKS installations, ROT sessions, health, paths and batch runs8 verbs