2011

Table Of Contents
The ACADDOC.LSP File
See also:
Overview of File Organization on page 3
Prevent AutoLISP Errors When Loading Startup Files on page 100
The acaddoc.lsp file is intended to be associated with each document (or
drawing) initialization. This file is useful if you want to load a library of
AutoLISP routines to be available every time you start a new drawing (or open
an existing drawing).
Each time a drawing opens, AutoCAD for Mac searches the library path for
an acaddoc.lsp file. If it finds one, it loads the file into memory. The acaddoc.lsp
file is always loaded with each drawing regardless of the settings of
ACADLSPASDOC.
Most users will have a single acaddoc.lsp file for all document-based AutoLISP
routines. AutoCAD for Mac searches for an acaddoc.lsp file in the order defined
by the library path; therefore, with this feature, you can have a different
acaddoc.lsp file in each drawing directory, which would load specific AutoLISP
routines for certain types of drawings or jobs.
The acaddoc.lsp file can contain AutoLISP code for one or more routines, or
just a series of load function calls. The latter method is preferable, because
modification is easier. If you save the following code as an acaddoc.lsp file, the
files mydocumentapp1.lsp, build.lsp, and counter.lsp are loaded every time a new
document is opened.
(load "mydocumentapp1")
(load "build")
(load "counter")
Quick Reference
Commands
APPLOAD
Loads and unloads applications and defines which applications to load at
startup.
Automatically Load and Run AutoLISP Routines | 99