Author Topic: Reloading Custom Commands error  (Read 1120 times)

0 Members and 1 Guest are viewing this topic.

MSTG007

  • Gator
  • Posts: 2598
  • I can't remeber what I already asked! I need help!
Reloading Custom Commands error
« on: May 20, 2015, 08:52:37 AM »
I have a autocad session that when it first opens the dwt all my custom commands work. When I open other drawings the custom commands do not work; but if I got back to the dwt they work. Is there a variable that needs to be set?
Civil3D 2020

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Reloading Custom Commands error
« Reply #1 on: May 20, 2015, 08:59:08 AM »
AutoCAD is normally not supplied with the user-defined startup file acaddoc.lsp; you create (Notepad can be used) and maintain the file yourself.

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).

Each time a drawing opens, AutoCAD searches the library path for an acaddoc.lsp file. If it finds one, it loads the file into memory. The acaddoc.lsp file is always loaded with each drawing regardless of the settings for the ACADLSPASDOC and LISPINIT system variables.

Most users will have a single acaddoc.lsp file for all document-based AutoLISP routines. AutoCAD searches for an acaddoc.lsp file in the order defined by the library path; therefore, with this feature, you can have a different acaddoc.lsp file in each drawing directory, which would load specific AutoLISP routines for certain types of drawings or jobs.

The acaddoc.lsp file can contain AutoLISP code for one or more routines, or just a series of load function calls. The latter method is preferable, because modification is easier. If you save the following code as an acaddoc.lsp file, the files mydocumentapp1.lsp, build.lsp, and counter.lsp are loaded every time a new
Be your Best


Michael Farrell
http://primeservicesglobal.com/