Acad.lsp does not get loaded when AutoCAD is initialized

Acad.lsp does not get loaded when AutoCAD is initialized

MarkSanchezSPEC
Advocate Advocate
3,951 Views
5 Replies
Message 1 of 6

Acad.lsp does not get loaded when AutoCAD is initialized

MarkSanchezSPEC
Advocate
Advocate

When AutoCAD is in an un-initialized state, we run a custom setup lisp routine that copies support files, loads our custom profile from an ARG file, and loads some partial menus. One of the files that gets copied is "acad.lsp", which gets copied to the "ROAMABLEROOTPREFIX" Support folder, which is a path included in our profile.

 

Everything appears to work, but when we click on toolbars from our loaded menus, they do not work. We have noticed that when viewed from APPLOAD, the acad.lsp file does not get loaded when you open an existing drawing, nor does it get loaded when you click QNEW to start a new drawing from our template, even though our loaded profile has the "Load acad.lsp when opening each drawing" option selected (see attachment). We have found that only after exiting and re-opening AutoCAD, does the acad.lsp file get loaded and everything then works as normal.

 

Why doesn't acad.lsp get loaded when opening or starting new drawings under this Initialization scenario?

0 Likes
Accepted solutions (1)
3,952 Views
5 Replies
Replies (5)
Message 2 of 6

cadffm
Consultant
Consultant
Accepted solution

We need to know what you do, HOW, in detail.

 

BTW: If you need the stuff from your acad.lsp in each file, why do you not use the right file for this? AcadDoc.lsp

 

What is "in an un-initialized state"? I think you mean every situation before you start you setup-lisp!?

 

How do you load a profile from a * arg file?

 

I have some questions more, but let's start with more informations from your side.

Sebastian

0 Likes
Message 3 of 6

SeeMSixty7
Advisor
Advisor
0 Likes
Message 4 of 6

MarkSanchezSPEC
Advocate
Advocate

That sounded promising but it didn't work. we call a SCRIPT from the command line switch as follows:

 

/b "D:\IDSP_2018\AutoCAD 2018\Support\SAStartup2018.scr"

 

i edited this script to set ACADLSPASDOC as follows:

 

ACADLSPASDOC
1
(load "SAStartup2018")

 

The 3rd line loads our custom routine that carries out all the rest of the work. that is the entire script contents. Same behavior.

Thanks!

0 Likes
Message 5 of 6

SeeMSixty7
Advisor
Advisor

You don't need that as part of your script. It is a global setting for AutoCAD.

To verify you are not having some other issues.

Inside AutoCAD at the command line.

(findfile "acad.lsp")

 

if it returns nil, you do not have your acad.lsp file on the path. 

If you have it on the path but did not add it to the trusted path then it will not load.

 

Let me know what you get back

0 Likes
Message 6 of 6

MarkSanchezSPEC
Advocate
Advocate

ACADDOC.lsp did the trick! Thanks so much.

I simply renamed my acad.lsp file to acaddoc.lsp and now everything works.

 

BTW, you asked "What is "in an un-initialized state"?"

I consider an un-initialized state, when the logged in user has NEVER launched AutoCAD before on that machine. Launching in this state causes AutoCAD to initialize, when it builds the folders and files in "C:\Users\LOGIN\AppData\Roaming\..." etc.

 

Your post and another from a 3rd party helped me understand what this file was:

https://forums.autodesk.com/t5/autocad-forum/acad2018doc-lsp-won-t-load/m-p/7277158

https://jtbworld.com/acaddoc-lsp

 

Thanks again!

0 Likes