TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: capsochist on January 26, 2023, 08:27:04 PM
-
Hello!
I wrote the attached LSP with the intention of automatically mapping a folder containing custom LSP files to the main acad.cuix upon execution.
I am going this route instead of the "more standard" acaddoc.lsp for a number of experimental reasons that may not be worth getting into.
The LSP seems to find the files correctly, however, I am struggling to figure out how to apply the directory path to the cuix. AutoCAD opens the CUI dialog for every LSP path I want to map but fails to set the directories correctly.
Any help would be much appreciated!
-
Might have to add that folder to the support path or trusted locations.
-
Thanks for the input - That doesn't seem to resolve the issue. I can get the LSP to execute - I am just struggling to figure out how to get the attached LSP to apply the changes within the CUI file.
-
I simpler way is to make custom CUI or start with a mnu, then just menuload and all done, I have 8 custom menus loaded plus 3 toolbars.
I have been doing it this way for like 40 years. I always started with a mnu.
(setq *files* (vla-get-files (vla-get-preferences (vlax-get-Acad-object))))
(setq paths (vla-get-SupportPath *files*))
(vla-put-SupportPath *files* (strcat "C:\\CAD-TOOLS\\SLIDES;C:\\CAD-TOOLS\\IMAGES;C:\\CAD-TOOLS;" paths))
(setq oldtrust (getvar 'trustedpaths))
(setvar 'trustedpaths (strcat oldtrust ";" "c:\\CAD-TOOLS"))