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
ApporDoc
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.
Other verb families
- Inspect, audit, edit and generate ASCII DXF drawings completely offline10 verbs
- Convert DWG/DXF, purge, audit, plot PDF and run batches headlessly via accoreconsole.exe6 verbs
- Attach to live AutoCAD sessions via ROT and manage open drawings safely7 verbs
- Draw 2D geometry, insert blocks and update attributes or layers by persistent Handle4 verbs
- Create drawings and run 2D CAD edits (move, copy, rotate, offset, fillet, trim, array) by Handle17 verbs
- Add dimensions, hatch, MTEXT, leaders, tables, viewports, XREFs and multi-page vector PDFs9 verbs
- Create and combine 3D solids (extrude, revolve, sweep, loft, boolean, slice, section)8 verbs
- Measure quantities, extract BOMs, run 3D clash checks, diff DWGs and render PNG previews6 verbs
- Compile declarative 2D/3D scenes, buildings, rule checks and ABNT/electrical drawing specs9 verbs
- Check AutoCAD installations, ROT sessions, plugin status, drawing paths and sealed knowledge base7 verbs