Build and edit 3D SOLIDWORKS part features, datums and materials
3D solid modeling over late-bound COM. Every write verb previews its plan by default and only modifies the part when `--apply` is passed, verifying rebuild health and volume changes before reporting back.
17 of the 92 verbs · Windows x64 · Late-bound SOLIDWORKS COM API
solid extrude --sketch N --depth D [--cut] [--both|--reverse] [--offset O] [--name NAME] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Boss (FeatureExtrusion3, merged) or with --cut a cut (FeatureCut4) of the active part from the sketch named N
solid cut --sketch N --depth D | --through-all [--both|--reverse] [--offset O] [--name NAME] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Removes material: the extruded cut of
extrude --cutas its own verb solid revolve --sketch N --axis AXIS [--angle DEG] [--cut] [--name NAME] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Boss (FeatureRevolve2) or with --cut a cut of the active part from the sketch named N, about AXIS: the name of a datum axis (
datum --axis) or line:K, the K-th line (1-based) of the sketch itself solid fillet [--ref B64|@fN ...] [--edge E ...] --radius R [--name N] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Constant-radius fillet on the edges named by persistent references
solid chamfer [--ref B64|@fN ...] [--edge E ...] --distance D [--distance2 D2 | --angle DEG] [--name N] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Chamfer on the edges named by persistent references, or by geometry with --edge E
solid shell --faces B64|@fN [--faces B64|@fN ...] --thickness T [--name N] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Hollows the active part inward, removing the faces named by persistent references
solid mirror --features NAME [--features NAME ...] --plane front|top|right|B64 [--name N] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Mirrors features of the active part about a reference plane (front, top, right: the first, second and third plane of the tree whatever the locale) or a planar face (its persistent reference, refs-list), merged into the body
solid linear-pattern --features NAME [--features NAME ...] --count N --spacing LEN [--reverse] [ --count2 N --spacing2 LEN [--reverse2]] [--name N] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Repeats features of the active part N times (seed included, 2 to 1000) along a direction, an edge or face persistent reference (refs-list) or its handle @fN, or a model axis (--axis x|y|z: the normal of the default plane, no lookup), LEN…
solid circular-pattern --features NAME [--features NAME ...] --axis B64 --count N [--angle DEG] [--reverse] [--name N] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Repeats features of the active part N times (seed included, 2 to 1000) around an axis, a circular edge or cylindrical face persistent reference (refs-list), spread equally over --angle degrees in total (default 360, above 0 up to 360)
solid datum --name N --plane P --by MM | --plane P --angle DEG --about AXIS [--toward x,y,z] | --through R,R[,R] | --axis P,P | --axis-face REF | --point x,y,z- Makes one datum of the active part named N (the spec id): a reference plane offset MM from plane P (--by, negative = the other side, 0 = coincident), at DEG (0..180) about the datum axis --about
solid datum-geom --ref R[,R...] [--file FILE] [--expect FILE] [--pid N]- Geometry of datums of the active part, read back from SOLIDWORKS (mm, unit vectors): per item ref, feature, type and RefPlane normal + origin (IRefPlane.Transform), RefAxis direction + origin (GetRefAxisParams), point datum at
solid set-dim --name N --value V [--config NAME] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Sets a dimension of the active part
solid set-extrude --feature F [--offset O] [--end blind|through-all|through-next|mid-plane] [--depth D] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Edits an existing extrude or cut of the active part: --offset O moves its start (0 = from the sketch plane, negative = the offset reversed), --end sets the end condition of direction 1, --depth its depth
solid set-material --material NAME [--database FILE] [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Sets the material of the active part (IPartDoc.SetMaterialPropertyName2, active configuration)
solid suppress --feature NAME [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Suppresses a feature of the active part, found by name
solid unsuppress --feature NAME [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Unsuppresses a feature of the active part, found by name
solid delete-feature --feature NAME [--file FILE (open, writable)] [--expect FILE] [--pid N] [--confirm]- Deletes one feature of the active part, found by name (only it: not its children, not its absorbed sketches)
Common questions
Which 3D modeling features can SolidWorks-CLI create and edit?
solid extrude, solid cut, solid revolve, solid fillet, solid chamfer, solid shell, solid mirror, solid linear-pattern and solid circular-pattern create features, while solid set-dim, solid set-extrude, solid set-material, solid suppress, solid unsuppress and solid delete-feature edit existing ones.
What happens if a feature edit breaks the rebuild?
Every write verb checks rebuild errors and volume changes after --apply; if the rebuild worsens or produces no geometry change, the edit is rolled back or deleted and the command reports the failure cleanly.
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
- Automate SOLIDWORKS assemblies, mates, BOM and interference checks10 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