You can load AutoLISP routines each time you run AutoCAD. You can also execute certain commands or functions at specific times during a drawing session.
Topics in this section
- Overview of AutoLISP Automatic Loading
-
The ACAD.LSP File
You can create an acad.lsp file if you regularly use specific AutoLISP routines. When you start AutoCAD, it searches the support file search path for an acad.lsp file. If an acad.lsp file is found, it is loaded into memory.
-
The ACADDOC.LSP File
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).
-
The MNL File for an AutoLISP Menu
When AutoCAD loads a customization file, it searches for an MNL file with a matching file name. If it finds the file, it loads the file into memory. This function ensures that AutoCAD loads the AutoLISP functions that are needed for proper operation of a menu.
-
Prevent AutoLISP Errors When Loading Startup Files
If an AutoLISP error occurs while you are loading a startup file, the remainder of the file is ignored and is not loaded.
-
S::STARTUP Function: Postinitialization Execution
You can define an S::STARTUP function to perform any needed setup operations after the drawing is initialized.