Loading order of AutoCAD startup files

In certain situations, it can be helpful to know the order in which AutoCAD's startup files are loaded. Autodesk documented this about 8 years ago and I wanted to check and see if it is still valid. Read more below...

You may not even be aware of all of the various startup files that are available. Generally speaking there are two "AutoCAD owned" files (acad2010.lsp and acad2010doc.lsp) and two "user owned" files (acad.lsp and acaddoc.lsp). In addition to this, for each menu file that is loaded, any .MNL file with the same name that exists (and can be found), will be loaded. Files contained in the Startup Suite are also loaded at startup (assuming it feels like cooperating...) and then finally, the special function (S::STARTUP) is executed. Note that this function can be defined in any startup file, and various parts of it may be contained in multiple startup files. It is always executed after AutoCAD has fully initilized.

Back to the startup file loading order, here is it, verified in AutoCAD 2010. All files are loaded each time a drawing is loaded, exceptions noted.

  • acad2010.lsp (AutoCAD file)
  • acad.lsp (User file - only loaded once at AutoCAD startup, unless ACADLSPASDOC=1)
  • acad2010doc.lsp (AutoCAD file)
  • acaddoc.lsp (User file)
  • custom.mnl (User file)
  • mymenu.mnl (User file)
  • acad.mnl (loaded when "acad.cui" is loaded)
  • acetmain.mnl (loaded when "acetmain.cui" is loaded - Express Tools)
  • files in the startup suite
  • S::STARTUP Function (may be defined in multiple locations)

You may notice that the partial menu MNL files all load before "acad.mnl", apparently in the order they were attached to the main menu. You can have as many of these files as there are menus being loaded. With regard to the ownership of files, "AutoCAD owned" files are installed with AutoCAD and may be overwritten during a service pack, update, reinstall, repair, etc. "User owned" files are created and maintained by the user, AutoCAD will never overwrite them. Always create and edit the User owned files and never edit the AutoCAD owned files and you will not have to worry about losing your modifications.

Comments

Two Things...

1. On my machine, the Enterprise CUI file (acmap.cui) loaded before my Custom CUI file. Doesn't seem to cause any problems, just noting it's different.

2. My custom MNL file is the last thing loading correctly. At that point, DBMOD = 0, which is what I want.

But then the command line reads the following:

*Cancel*

Command: COMMANDLINE

Command: properties

Command:

So it's done loading now, and I can start typing at the command line. I type DBMOD and it's 28.

Based on what I've learned from your (very) helpful post, there is probably some S::STARTUP code being run.

I want to get rid of the *Cancel* (or at least know where it's coming from) and I want DBMOD = 0

How do I debug this? Can I?

 


All content is copyright © CAD PANACEA 2005-2013 unless otherwise noted and may not be reproduced. All comments posted to this blog are the sole responsibility of the person making the comment.

Google, as a third party vendor, uses cookies to serve ads on this site. Google's use of their cookies enables it to serve ads to users based on their visit to your sites and other sites on the Internet. You may opt out of the use of these cookies by visiting the Google ad and content network privacy policy.

Powered by Drupal