• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 22. Introduction to AutoLISP Pro... > Understanding ACAD.LSP and ACADDOC.L...

Understanding ACAD.LSP and ACADDOC.LSP

If you want to load a group of AutoLISP routines every time you start AutoCAD, you can place the routines in a standard (ASCII) text file and save the file with the name ACAD.LSP. When AutoCAD starts, it searches its library path for a file named ACAD.LSP. If it finds such a file, its contents are loaded into memory. By default, ACAD.LSP is loaded only once: upon starting AutoCAD. If you want to load a group of AutoLISP routines every time you start a new drawing (or open an existing drawing), you should create a file named ACADDOC.LSP and place it in AutoCAD’s library path. Each time AutoCAD opens a drawing, it searches the library path for a file named ACADDOC.LSP and if a file with that name is found, it loads the contents of the file into memory.

You can have ACAD.LSP load with every drawing by selecting the Load ACAD.LSP with Every Drawing option on the System tab of the Options dialog box. If this option is not checked, only the ACADDOC.LSP file is loaded into all drawing files. Clear this option if you do not want to run certain LISP routines in specific drawing files. You can also control Load ACAD.LSP with Every Drawing by using the ACADLSPASDOC system variable.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint