AutoCAD-CLI

Query live AutoCAD layers, blocks, entities, attributes, XREFs, layouts and sysvars

Read-first inspection on an open AutoCAD drawing. List layers, blocks, ModelSpace entities with their permanent hexadecimal Handle (group 5), extract title-block and BOM attributes, verify XREF paths and paper-space layouts, and inspect or set AutoCAD system variables safely.

8 of the 91 verbs · Windows x64 · Offline DXF + accoreconsole.exe + Late-bound COM

cad layers [--file FILE] [--expect FILE] [--limit N] [--digest]
Lists layers of the active drawing in live AutoCAD (name, handle, color, linetype, on, frozen, locked) (Ring 1A)
cad blocks [--file FILE] [--expect FILE] [--include-system] [--limit N] [--digest]
Lists block definitions in the active drawing in live AutoCAD (Ring 1A)
cad entities [--layout NAME] [--file FILE] [--expect FILE] [--layer L] [--type T] [--handle H] [--limit N] [--digest]
Lists ModelSpace entities of the active drawing in live AutoCAD with persistent hex Handle, type, layer, and coordinates (Ring 1A)
cad attrs [--layout NAME] [--file FILE] [--expect FILE] [--block NAME] [--tag TAG] [--handle H] [--limit N] [--digest]
Extracts block-reference attributes (insertHandle, attribHandle, block, layer, tag, value) from the active drawing in live AutoCAD (Ring 1A)
cad xrefs [--file FILE] [--expect FILE] [--limit N] [--digest]
Lists external references (XREFs) attached to the active drawing and whether each resolved path exists on disk (Ring 1A)
cad layouts [--file FILE] [--expect FILE] [--limit N] [--digest]
Lists paper-space and model-space layouts (name, handle, tabOrder, active, plotter config, media) in the active drawing (Ring 1A)
cad sysvar --name VAR [--value VAL] [--file FILE] [--expect FILE] [--apply] [--confirm]
Reads an AutoCAD system variable (GetVariable) or sets it (SetVariable) with --value VAL --apply (Ring 1A)
cad api-probe --chain EXPR [--file FILE] [--expect FILE]
Read-only late-bound COM reflection probe starting from App or Doc

Common questions

How does AutoCAD-CLI address entities in an open drawing?

Every entity carries its permanent hexadecimal DWG Handle (group code 5), returned by cad entities and cad attrs and resolved directly through HandleToObject, never brittle collection indices.

Can I inspect XREFs, layouts and system variables from the command line?

Yes. cad xrefs lists external references and checks whether target files exist, cad layouts reports paper-space/model-space plotter configurations, and cad sysvar reads or updates AutoCAD system variables safely.

Run these verbs on your own DWG and DXF drawings

Every verb above returns structured JSON and takes plain command-line flags. AutoCAD-CLI is local and on-premise: zero UAC elevation, zero Autodesk DLLs redistributed, and every write is a dry run until you pass --apply. Fourteen-day free trial with corporate e-mail, no card.

Start a 14-day free trial

Other verb families