bim-acad

Drive AutoCAD from the command line without opening it. bim-acad runs the headless AutoCAD Core Console (accoreconsole.exe) that ships with every AutoCAD install — the full drawing engine, no window, no mouse. Inspect drawings, extract geometry and block data, batch-convert, print PDFs, clean up, and hand structured BIM metadata to bim-pdf.

AutoCAD automation via the Core Console. Each command spins the real engine headless, runs a generated script, and returns structured JSON — safe to batch across a whole drawing library.

Requires: a local AutoCAD 2025 or 2026 install. bim-acad auto-discovers accoreconsole.exe (highest year first); bim acad doctor reports what it found. No add-in DLL to install.

How it works

Every verb generates a temporary AutoCAD script (.scr + AutoLISP), runs accoreconsole.exe /i <drawing> /s <script> in an isolated profile, and reads results from a LISP-written side-car file. The Core Console is core-only — AutoLISP and .NET work, but COM/ActiveX (vla-*) does not — so bim-acad stays in core commands and core LISP. Pure-reader verbs open the drawing read-only.

DWG → PDF·BIM pipeline

bim-acad's block support is shaped to compose with bim-pdf. Plot a sheet, extract its title-block data, and embed it as a validatable PDF·BIM package:

bim acad convert  A-01.dwg --to pdf --out A-01.pdf     # plot the sheet
bim acad elements A-01.dwg > elements.json             # package-v1 metadata
bim pdf  package  --file A-01.pdf --metadata elements.json --out A-01.pkg.pdf
bim pdf  bim.validate --file A-01.pkg.pdf              # 6/7 checks pass

bim acad elements emits a PDF·BIM package-v1 document (schemaVersion / generator / source / units / sheets / elements) built from the drawing's blocks, attributes, and layouts.

Verbs

VerbWhat it does
bim acad info FILE [--console FILE] [--timeout TIMEOUT]Report layers, layouts, blocks, model-space entity counts, and extents for a DWG/DXF
bim acad extract FILE [--layer LAYER] [--types TYPES] [--limit N] [--console FILE] [--timeout TIMEOUT]Stream model-space entities (type, layer, handle, point, radius, text, block name) as NDJSON
bim acad convert FILE [--out FILE] [--to TO] [--version VERSION] [--layout LAYOUT] [--paper PAPER] [--orientation ORIENTATION] [--yes] [--dry-run] [--console FILE] [--timeout TIMEOUT]Convert/print a drawing to DXF, DWG (version-targeted), or PDF (plotted via DWG To PDF.pc3)
bim acad blocks FILE [--console FILE] [--timeout TIMEOUT]List block definitions as NDJSON (name, instances, has_attributes, anonymous, xref)
bim acad layers FILE [--console FILE] [--timeout TIMEOUT]List the LAYER table as NDJSON (name, color, on, frozen, locked, plottable, linetype)
bim acad attributes FILE [--block BLOCK] [--layout LAYOUT] [--limit N] [--console FILE] [--timeout TIMEOUT]Extract block-reference attributes as NDJSON records {name, handle, space, insert, attributes} — feeds `bim pdf form.fill` / `bim pdf package`
bim acad purge FILE [--out FILE] [--yes] [--dry-run] [--console FILE] [--timeout TIMEOUT]Remove all unused named objects (-PURGE All) and save the drawing
bim acad audit FILE [--out FILE] [--yes] [--dry-run] [--console FILE] [--timeout TIMEOUT]Audit and fix drawing errors (AUDIT) and save; reports errors found/fixed
bim acad elements FILE [--console FILE] [--timeout TIMEOUT]Emit a PDF·BIM package-v1 elements.json (schemaVersion/generator/source/units/sheets/elements) from the drawing's blocks — feeds `bim pdf package`
bim acad exec FILE [--scr FILE] [--lisp FILE] [--console FILE] [--timeout TIMEOUT]Run an arbitrary .scr/AutoLISP script against a drawing (core-only; no COM/vla-*)
bim acad doctorDriver health check — discovers accoreconsole installs and verifies the output dir
bim acad versionDriver version

xref

VerbWhat it does
bim acad xref.list FILE [--console FILE] [--timeout TIMEOUT]List external references as NDJSON (name, path, type attach/overlay, status)
bim acad xref.detach FILE [--name NAME] [--all] [--out FILE] [--yes] [--dry-run] [--console FILE] [--timeout TIMEOUT]Detach external reference(s) (-XREF Detach) and save
bim acad xref.bind FILE [--name NAME] [--all] [--out FILE] [--yes] [--dry-run] [--console FILE] [--timeout TIMEOUT]Bind external reference(s) into the drawing (-XREF Bind) and save

For agent use: /acad/llms.txt