Jump to content

acaddoc.lsp - Question


GregGleason

Recommended Posts

Will the acaddoc.lsp run in any folder, or just in folders defined in the search path.  My assumption from reading the documentation is that it does not need to be defined in the search path.  The only requisite is the acaddoc.lsp file and the .dwg file need to be in the same folder. 

The reason that I ask is that on AutoCAD 2018 does not run acaddoc.lsp like the earlier versions did (2014 & 2016).

Can anyone confirm or correct this?

Greg

Link to comment
Share on other sites

I have to admit, I was skeptical when I read your post. Things rarely change with AutoCAD/Autolisp over the years, or at least I would have thought I would have remembered this.

But after some testing, I agree.

Given an "acaddoc.lsp" file in the drawing folder, in AutoCAD 2016 and lower, it does get loaded, regardless of the existence of any other "Acaddoc.lsp" file. Presumably because AutoCAD is considering the drawing folder at the TOP of the support file search path.

 

On 2017 and later, it does not load the "Acaddoc.lsp" file from the drawing folder. It loads the first one it finds in the Support File Search Path (presuming there is another one). This makes me think it's no longer considering the DWG folder to be at the top of the support file search path.

 

An old trick is to run the -INSERT command (note the hyphen), and then enter a bogus string (EXAMPLE: "gsdfg543casdfas" ) for the block you want to insert. AutoCAD will respond with a message dialog stating that it can't find "gsdfg543casdfas" in the search path, and then list all of the search paths. The listing of the search paths has not changed in 2017 and later however. It still shows the DWG folder as second in the list, right above the "Support File Search Path" that you see in OPTIONS.

 

Looks like you found a bug, unless you can find some documentation on this changed behavior. I know who to ask. I'll report back if I find out something.

Link to comment
Share on other sites

Thank you, rkmcswain, for taking an interest in this issue and appreciate the information if something is known.  I have been scratching my head a few days about it.

 

Greg

Link to comment
Share on other sites

I took up the issue with my reseller and he forwarded it to Autodesk when he was able to replicate it with AutoCAD 2017 and a fully patched install of 2018.

 

The answer came back pretty quickly and they were simple fixes:

LEGACYCODESEARCH set that to ON
SECURELOAD set that to 0

 

Once I set those then all was golden again.

 

Thank you for all the comments.

 

Greg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...