Draw 2D geometry, insert blocks and update attributes or layers by persistent Handle
Safe live editing over late-bound COM. Address every entity by permanent DWG `Handle` (`HandleToObject`), never fragile collection indices. Every write previews first in dry-run mode and wraps `--apply` edits inside `StartUndoMark()` / `EndUndoMark()` for clean rollback.
4 of the 91 verbs · Windows x64 · Offline DXF + accoreconsole.exe + Late-bound COM
cad set-attr [--handle ATTRIB_OR_INSERT_H] [--block NAME] [--tag TAG] --value VAL [--layout NAME] [--file FILE] [--expect FILE] [--apply] [--confirm]- Updates live block attribute(s) by persistent hex
attribHandleorinsertHandle(+--tag) or--block+--taginside an UndoMark (Ring 1A) cad set-layer [--handle H] [--from-layer L] [--type T] --layer TARGET [--create-layer] [--color N] [--layout NAME] [--file FILE] [--expect FILE] [--apply] [--confirm]- Reassigns live entity layer(s) by persistent hex
Handle,--from-layer, or--typeinside an UndoMark (Ring 1A) cad draw --kind KIND [--from P] [--to P] [--center P] [--radius R] [--start-deg A] [--end-deg B] [--points PTS] [--closed] [--width W] [--height H] [--text T] [--layer L] [--layout NAME] [--file FILE] [--expect FILE] [--headless] [--out FILE] [--acad PATH] [--timeout N] [--apply] [--confirm]- Creates a 2D entity (
line,circle,arc,lwpolyline,rect,text,point) in live ModelSpace using strictdouble[3]/ flatdouble[2*N]marshalling inside an UndoMark (Ring 1A) cad insert-block --block NAME [--at P] [--scale S] [--rotation DEG] [--layer L] [--attrs K=V] [--layout NAME] [--file FILE] [--expect FILE] [--apply] [--confirm]- Inserts a block reference in live ModelSpace (converting
--rotationdegrees to radians) and optionally populates--attrs TAG=VAL,TAG2=VAL2inside an UndoMark (Ring 1A)
Common questions
What happens if a live edit fails halfway through?
Write verbs (cad set-attr, cad set-layer, cad draw, cad insert-block) wrap mutations inside StartUndoMark() / EndUndoMark() so AutoCAD Undo cleanly reverts the operation, and all writes default to a dry run until --apply is passed.
Can I insert a title block or electrical symbol with attributes in one command?
Yes. cad insert-block inserts a named block at --at X,Y, converts --rotation degrees to radians automatically, and populates --attrs TAG=VALUE,TAG2=VALUE2 in a single UndoMark.
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
- Query live AutoCAD layers, blocks, entities, attributes, XREFs, layouts and sysvars8 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