| Knowledgebase Home | Glossary | Favorites | Login |
Automatic loading of variables is achieved using the acaddoc.lsp file. AutoCad reads this file every time a drawing is opened. Find this file by typing on the command line: (findfile "acaddoc.lsp") .
For each variable that is to be included for automatic loading, add a line to the file using the following format: (setvar "variablename" variablevalue) Where: "variablename" = the name of the variable required. variablevalue = the required value of that variable. e.g. (setvar "luprec" 3)
Save the file as acaddoc.lsp in the support folder under the AutoCad installation folder: Lisp routines can also be included in the acaddoc.lsp file so they can also load automatically when a drawing is opened. Add the following line to the acaddoc.lsp file to automatically load a lisp routine: (load "C:/lispfolder/lispname.lsp")
Use a forward slash for folder separation/path. Variables can also be set up in the AutoCad drawing template file (acad.dwt) so they will load automatically when a new drawing is opened. |