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

Verb What it does
bim acad info <file> layers, layouts, blocks, model-space entity counts by type, extents
bim acad extract <file> [--layer] [--types] [--limit] stream model-space entities as NDJSON (type, layer, handle, point, block name)
bim acad blocks <file> block-definition inventory — instances, has_attributes, anonymous, xref
bim acad attributes <file> [--block] [--layout] block-reference attributes as {name, handle, space, insert, attributes} records
bim acad elements <file> emit a PDF·BIM package-v1 elements.json for bim pdf package
bim acad convert <file> --to dxf|dwg|pdf [--version] [--paper] convert to DXF/DWG (version-targeted) or print to PDF via DWG To PDF.pc3
bim acad purge <file> remove all unused named objects (-PURGE All) and save
bim acad audit <file> audit and fix drawing errors (AUDIT); reports errors found/fixed
bim acad xref list <file> list external references (name, path, attach/overlay, status)
bim acad xref detach|bind <file> --name|--all detach or bind Xrefs and save
bim acad exec <file> --scr|--lisp|- run an arbitrary .scr/AutoLISP script against the drawing
bim acad doctor check that AutoCAD's Core Console is installed and discoverable

For agent use: /acad/llms.txt