TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Topic started by: capsochist on January 26, 2023, 08:27:04 PM

Title: Help Mapping custom LISP to CUI location
Post 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!
Title: Re: Help Mapping custom LISP to CUI location
Post by: mhupp on January 27, 2023, 07:34:57 AM
Might have to add that folder to the support path or trusted locations.
Title: Re: Help Mapping custom LISP to CUI location
Post by: capsochist on January 27, 2023, 09:32:23 AM
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.
Title: Re: Help Mapping custom LISP to CUI location
Post by: BIGAL on January 27, 2023, 05:43:59 PM
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.

Code: [Select]
(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"))