Support File Search Path character limit in lisp

Support File Search Path character limit in lisp

BrianHailey
Mentor Mentor
371 Views
5 Replies
Message 1 of 6

Support File Search Path character limit in lisp

BrianHailey
Mentor
Mentor

Hello everyone,

 

I'm trying to add an additional support file search path location via lisp for all of our users. I've found several lisp routines that will do this but the problem I'm running into is that it seems that the (setq path (getenv "ACAD")) doesn't return the entire list of search paths that I already have. It appears there's a character limit to this and the list gets truncated. Does anyone know of a way around this? I'm only adding eight additional search paths to what comes default with Civil 3D but there are a  lot of default search paths.

BrianHailey_1-1686318333377.png

 

 

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

0 Likes
372 Views
5 Replies
Replies (5)
Message 2 of 6

rkmcswain
Mentor
Mentor

We add 5 paths at the top, and I've had no problems, but I'm not using (getenv "ACAD") either.

 

The only issue I've run into lately is that 2022 and earlier,

 

(vl-registry-read (strcat "HKEY_LOCAL_MACHINE\\" (vlax-machine-product-key)) "ACADLOCATION")

 

..returns the path without the trailing slash, while 2023 and later includes a trailing slash

🙄

R.K. McSwain     | CADpanacea | on twitter
0 Likes
Message 3 of 6

BrianHailey
Mentor
Mentor

@rkmcswain If you aren't using (getenv "ACAD"), are you reading and writing directly from/to the registry?

Brian J. Hailey, P.E.



GEI Consultants
My Civil 3D Blog

0 Likes
Message 4 of 6

ronjonp
Mentor
Mentor

@BrianHailey 

Maybe try this:

 

(vla-get-supportpath (vla-get-files (vla-get-preferences (vlax-get-acad-object))))

 

0 Likes
Message 5 of 6

Moshe-A
Mentor
Mentor

@BrianHailey hi,

 

it looks like your overflow with the string size of acad path, try to increase this value and look here (i never done it)

 

>> enable long path behavior in Windows 10: << 

 

Moshe

 

0 Likes
Message 6 of 6

Sea-Haven
Mentor
Mentor

There was a undocumented use ".." on end of a search path and it would read sub directories automatically. I know I have used it, will try to find and test again, have a sneaky suspicion it has been discontinued. Makes your support paths way shorter.

 

C:\Cadsupport\common..

 

I also asked Bricscad about support for this and I dont think it was a couple of years ago now.

 

 

 

 

0 Likes