Address SOLIDWORKS faces and edges by persistent reference and inspect COM APIs
Reliable geometry addressing is the foundation of headless CAD automation. Faces and edges are tracked with persistent references (`GetPersistReference3`) instead of brittle selection indices, alongside Ring-0 COM typelib reflection and live read-only probing.
7 of the 92 verbs · Windows x64 · Late-bound SOLIDWORKS COM API
solid refs-list [--file FILE] [--expect FILE] [--kind K] [--surface S] [--normal x,y,z] [--fingerprint SUBSTR] [--sort area] [--full-ref] [--limit N] [--digest] [--pid N]- Faces or edges of the active part with a persistent reference each, base64
solid refs-of --feature NAME [--file FILE] [--expect FILE] [--kind K] [--surface S] [--fingerprint SUBSTR] [--full-ref] [--limit N] [--digest] [--pid N]- Faces or edges the feature NAME made (edges: of those faces, de-duplicated), each with a handle @fN and a fingerprint, same shape as refs-list
solid refs-resolve [--file FILE] [--expect FILE] --ref B64|@fN [--pid N]- What a persistent reference from refs-list names in the active part: kind, owning feature, fingerprint
solid geom --ref B64|@fN [--file FILE] [--expect FILE] [--pid N]- Geometry facts of one face or edge named by a refs-list/refs-of reference, SI (m, m2, rad): face = surface type, area, normal and origin (plane) or axis and radius (cylinder), box and box centre
solid api-sig INTERFACE.MEMBER | MEMBER | --member SPEC [--brief]- Ring 0: the real COM signature(s) read by reflection from the installed SolidWorks.Interop.sldworks.dll (in place, never copied): per overload interface, member, returns, count, required and params {name, type, byRef}, plus note on a…
solid api-enum NAME | --name NAME- Ring 0: the values of a swconst enum (found, count, values {member: int}, note: the values are the interop's, runtime COM may answer other codes, check with probe)
solid api-probe --member NAME | --chain A.B[0].C(arg) [--on app|doc|ext] [--component NAME | --mate NAME] [--arg V ...] [--set VALUE] [--file FILE] [--expect FILE] [--pid N]- Reads one member (raw state: a CommandInProgress or a busy flag shows what SOLIDWORKS reports at that instant, including from a ring-1 verb you just ran) of the SOLIDWORKS application (app), the active document (doc, default) or its…
Common questions
Why does SolidWorks-CLI use persistent references instead of selection indices?
Selection indices shift whenever the feature tree changes. solid refs-list and solid refs-of issue persistent references (GetPersistReference3) with short @fN handles validated by solid refs-resolve and solid geom so edits never hit the wrong face or edge.
Can I inspect SOLIDWORKS COM signatures and enums offline?
Yes. solid api-sig and solid api-enum reflect the locally installed SOLIDWORKS typelib at Ring 0 without attaching to a session, while solid api-probe reads live COM properties safely.
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
- 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
- Check SOLIDWORKS installations, ROT sessions, health, paths and batch runs8 verbs