The acaddoc.lsp file can be created with a basic text editor.Įxample of a basic acad.lsp.
Just like the Acad.lsp, the path list is searched in priority of how they are listed, from top to bottom, so if more than one acaddoc.lsp exist in different path locations, the first one found will be the one that gets loaded. This means that this file should most commonly be used to set drawing specific variables. The ACADLSPASDOC variable does not apply to the acaddoc.lsp file. If there is an acaddoc.lsp file found in the Support Search Path when a drawing is opened, it will be loaded each time. Since the acad.lsp will run at start-up, you may want to use it to set application based variable, create or load custom shortcut keys and load other custom routines. Remember it will read the first acad.lsp file it comes to in the list of paths, so one path could be a location on a server that is shared by all users. Setting it to 1, will cause the acad.lsp file to be reloaded each time a drawing is opened during a session.Ĭreate an acad.lsp file using a basic text editor and place it into one of the Support File Search Path locations. The ACADLSPASDOC is a system variable to control when the acad.lsp gets loaded. By default the acad.lsp file is only read once at the application start-up. If the file is found it reads the contents and loads it in memory. When AutoCAD starts, it searches the support file search path for an acad.lsp file. Which means first knowing how acad.lsp and acaddoc.lsp work, and where these files should be located. Using acad.lsp and acaddoc.lsp to set application variables, and drawing variablesĪ good place to start with AutoCAD customization is with the basic use of Lisp.