Author Topic: Help Mapping custom LISP to CUI location  (Read 784 times)

0 Members and 1 Guest are viewing this topic.

capsochist

  • Newt
  • Posts: 24
Help Mapping custom LISP to CUI location
« 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!

mhupp

  • Bull Frog
  • Posts: 250
Re: Help Mapping custom LISP to CUI location
« Reply #1 on: January 27, 2023, 07:34:57 AM »
Might have to add that folder to the support path or trusted locations.

capsochist

  • Newt
  • Posts: 24
Re: Help Mapping custom LISP to CUI location
« Reply #2 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.

BIGAL

  • Swamp Rat
  • Posts: 1409
  • 40 + years of using Autocad
Re: Help Mapping custom LISP to CUI location
« Reply #3 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"))
A man who never made a mistake never made anything