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.