We know:
1. The file "acad.lsp" does not ship with AutoCAD.
2. If it exists in a path that is in the Support paths and Trusted Locations, that AutoCAD will automatically load it when when initialized or re-open.
Is there a way we can add our "acad.lsp" file to the AutoCAD deployment, such that it already exists in a Support and Trusted Location when AutoCAD is initialized by the user for the first time?
Solved! Go to Solution.
Solved by rkmcswain. Go to Solution.
Hi,
you should take care ... AutoCAD only loads the first ACAD.LSP it finds, so if the user has already an ACAD.LSP and you add a second one only one of them will be loaded. If it then loads your ACAD.LSP then the user will miss the functions defined in the other ACAD.LSP
The best to add something to existing installations, without modifying the "other" files, would be to add your content as plugin (>>>details<<< and look to the links inside that AKN article).
- alfred -
Put it in a common, read-only network location. Then point your users to start with a profile in an ARG file which has the desired search paths. Minimize the amount of management by putting as little as possible on individual computers.
Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.
If I add a lisp file in this section (e.g. customcorporatestartup.lsp), will it automatically be ran on startup? Or just copied to the selected installation path?
The latter.
If you want something to load automatically, you have to call it from "acad.lsp" (for once per session), or "acaddoc.lsp" (for once per document).
Okay, so... If I add (load "CommandLibrary") at the end of the acaddoc.lsp file found in the deployment directory, and in the 'Support File Search Path' and 'Trust Locations' I include a shared folder path (on the network) which includes a file called "CommandLibrary.lsp". Then I can use this file as a library for all custom commands, variable settings, etc.? As in, each time the user runs AutoCAD this lisp file (CommandLibrary.lsp) will be automatically loaded and ran?
Also, we have custom shape files (.shx) located in a shared folder. How can I ensure that these can be used by users without having to copy them into the "C:\Users\Username\AppData\Roaming\Autodesk\AutoCAD 20##\R##.#\enu\Support" folder?
I found answers to my own questions. I'm responding in case anyone else finds this helpful.
I recommend searching up "About Auto-Loading and Running AutoLISP Routines" in the AutoCAD help file for more information (ACAD 2020: https://help.autodesk.com/view/ACD/2020/ENU/?guid=GUID-FDB4038D-1620-4A56-8824-D37729D42520).
If you are creating a Microsoft SCCM Deployment and want to create an easily modifiable configuration then I recommend this:
Set 'Support File Search Path' and 'Trusted Locations' paths in the Microsoft SCCM deployment to network (shared) folder. I recommend creating a "startup" folder per AutoCAD version (e.g. "...\AutoCAD 2020 Startup".) In this folder include acad.lsp (loaded per session) and acaddoc.lsp (loaded for each drawing file) files. These files will be auto-loaded by AutoCAD. Ensure that the specified paths are the top of the 'Support File Search Path' list as items stored in these paths are loaded in sequence. Include custom settings for variables, commands, apps loading, etc. in these two files lisp, which ever is more appropriate.
Similarly for shape files, custom line types, etc. store these in another network folder(s) and add the path(s) in 'Support File Search Path' in the SCCM deployment. These paths should be located near the top of the list but below the startup folder.
Ensure to lock down the user permissions/access to the folders.
Can't find what you're looking for? Ask the community or share your knowledge.