CADEx

acaddoc.lsp

Short answer

A LISP file AutoCAD loads every time a drawing is opened, used for per-document setup and (defun S::STARTUP).

acaddoc.lsp is the per-document startup file: AutoCAD loads it every time a DWG is opened, not just at session start. Use it when your routine needs to register reactors against the active document, define layers, or run (defun S::STARTUP () …) — the special function name AutoCAD calls automatically after any DWG opens. For session-wide setup that should only happen once, use ACAD.lsp instead.

Related guides

How to Auto-Load a LISP Routine When AutoCAD Starts

Four ways to make a LISP routine load automatically — Startup Suite, ACAD.lsp, acaddoc.lsp, and Trusted Locations — and which to pick.

Related terms

ACAD.lsp

A LISP file AutoCAD looks for on every session start and loads automatically — the standard place to autoload routines.

AutoLISP

Autodesk's dialect of LISP, built into AutoCAD since 1986, used to write custom commands and automate drawings.

S::STARTUP

A special LISP function name AutoCAD calls automatically after any drawing finishes loading.