The acad.lsp is a special routine recognized by AutoCAD and is loaded every time an AutoCAD session is launched. The acaddoc.lsp is a special routine recognized by AutoCAD and is loaded every time an AutoCAD drawing is opened.
We can take advantage of these auto-loading routines to load custom content by placing files named either acad.lsp or acaddoc.lsp in any of our support paths defined by our network based profile. Creating separate (custom) acad.lsp and/or acaddoc.lsp files does not interfere with the delivered AutoCAD files (they just need to be in different folders).
For example, in our AutoCAD profile we have a support path defined (C:\sld):
This could of course be any network path. Let's place a custom acaddoc.lsp file that loads some custom content in this folder.
Now when AutoCAD is launched in a profile where our above path is a support path our custom lisp content is loaded.
Note, since we used acaddoc.lsp our routine will load every time a drawing is opened. If we only want our routine to load when AutoCAD is launched we would change the filename to acad.lsp.
I am not sure if there are other default filenames that behave similarly but the above two work great and should provide as much flexibility as you would need. This does not work for .dll files directly however, if you have a custom .dll you can just place a NETLOAD statement inside your custom acad.lsp or acaddoc.lsp. Remember, once you have an access point to load one routine, you can load as many other lisp routines, .dll files, .arx files, and more that you need.
This approach provides another streamlined method to load and manage custom content for multiple users.
No comments:
Post a Comment