Acad.lsp file deployment

Acad.lsp file deployment

MarkSanchezSPEC
Advocate Advocate
3,305 Views
8 Replies
Message 1 of 9

Acad.lsp file deployment

MarkSanchezSPEC
Advocate
Advocate

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?

0 Likes
Accepted solutions (1)
3,306 Views
8 Replies
Replies (8)
Message 2 of 9

Alfred.NESWADBA
Consultant
Consultant

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 -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2026
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Likes
Message 3 of 9

rkmcswain
Mentor
Mentor
Accepted solution

Are you building a deployment? If so, you can include it there.

c4451.PNG

 

@MarkSanchezSPEC 

R.K. McSwain     | CADpanacea | on twitter
Message 4 of 9

dgorsman
Consultant
Consultant

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. 

----------------------------------
If you are going to fly by the seat of your pants, expect friction burns.
"I don't know" is the beginning of knowledge, not the end.


0 Likes
Message 5 of 9

scot-65
Advisor
Advisor
Alfred's suggestion is the most plausible.

Perhaps look into appending S::STARTUP.
There is documentation for this.

How about using MyMenu.MNL as the interface point?
Ditto with acaddoc.LSP.

For acad and acaddoc, the first one in the support path wins.

For MyMenu.MNL, place in same directory as the MyMenu.CUIX.
File names are the same for this to work.

In our environment, acad.lsp is for loading DLL's.
acaddoc.lsp is for all reactors (which can be instantly disabled, if needed).
Everything else is initiated inside the MNL.

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

Message 6 of 9

Owackenreuther
Advocate
Advocate

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?

0 Likes
Message 7 of 9

rkmcswain
Mentor
Mentor

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

R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 8 of 9

Owackenreuther
Advocate
Advocate

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?

0 Likes
Message 9 of 9

Owackenreuther
Advocate
Advocate

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.

0 Likes