Class LispStartup
What AutoCAD loads when a drawing is opened, in its order: acad.lsp from the support folders once for the
session of the program (for every drawing with AcadLspAsDoc), acaddoc.lsp for every drawing,
then, which AutoCAD has no step for, each .lsp file of the Lisps folder beside the program
(Lisps), each file of the Startup Suite, and last the function S::STARTUP where a
file defined one. An error in a step is written and the next step runs.
public sealed class LispStartup
- Inheritance
-
LispStartup
- Inherited Members
Remarks
One instance belongs to one run of the program: it remembers that acad.lsp was loaded, so that the second
drawing it is given to does not load it again. The window gives each drawing it opens to OnDocumentOpened(CadCommandSession).
The Lisps folder takes the place AutoCAD gives the files that come with a program, a menu's .mnl, between
acaddoc.lsp and the Startup Suite. Its files load in the order of the walk (a folder's own files by name ignoring case, then its subfolders); a file in a subfolder is loaded too
((load "Sub/x") reaches it as well), and acad.lsp and acaddoc.lsp put there are the two files of those
names, found along the search path after the user's folders, and not loaded a second time here; one in a subfolder is an ordinary file and loads in its turn.
Properties
- AcadLspAsDoc
Gets or sets whether
acad.lspis loaded into every drawing opened, as AutoCAD's ACADLSPASDOC 1, and not once for the session. False by default.
- StartupSuite
Gets the files of the Startup Suite, each a full path, in the order they are loaded.
Methods
- OnDocumentOpened(CadCommandSession)
Runs the startup of a drawing in its session:
acad.lspfound along the document's search path (the first time this is called, or every time with AcadLspAsDoc),acaddoc.lsp, every.lspfile directly in the Lisps folder, the Startup Suite andS::STARTUP. What the files write goes to the session's history; a file not found is a; error: LOAD failed:line for a file of the Startup Suite and no line for the two named files. A file of the Lisps folder that errors is written and the next one loads; a compiled.fasor.vlxthere is the compiled-AutoLISP refusal, once for the drawing.