Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom CUI file not loaded on launch using AutoCAD 2024

8 REPLIES 8
SOLVED
Reply
Message 1 of 9
markhop1
415 Views, 8 Replies

Custom CUI file not loaded on launch using AutoCAD 2024

 

 

Hi everyone, 

I have a simple LISP script that loads a custom CUI Panel in my ribbon when AutoCAD launches. For context, it also loads a custom plugin, but that is not relevant to my problem. This is the code I use: 


CustomRibbonLoader.lisp

 

(vl-load-com)

(vla-load (vla-get-menugroups (vlax-get-acad-object)) "./CustomRibbon.cuix")

 

 

PackageContents.xml

 

<ApplicationPackage SchemaVersion="1.0" Version="1.0" ProductCode="XXX" ProductType="Application" Name="Custom Plugin" Icon="./Contents/Resources/logo.ico" HelpFile="./Contents/Resources/en-US/plugin.htm">
    <CompanyDetails Name="CompanyName" Url="www.url.com" Email="info@info.com" Phone=" " />
    <Components>
        <RuntimeRequirements OS="Win64" Platform="AutoCAD*" />
		<ComponentEntry AppName="Custom Plugin" ModuleName="./Contents/Plugin.dll" AppDescription="Custom App" LoadOnCommandInvocation="True" LoadOnAutoCADStartup="False">
			<Commands GroupName="CustomCommands">
				<Command Global="COMMAND1" Local="COMMAND1" />
				<Command Global="COMMAND2" Local="COMMAND2" />
				<Command Global="COMMAND3" Local="COMMAND3" />
			</Commands>
		</ComponentEntry>
        
        <ComponentEntry AppName="Custom CUIX" Version="1.0.0" ModuleName="./Ribbon/CustomRibbon.cuix" />
        <ComponentEntry AppName="Custom CUIX Loader" Version="1.0.0" ModuleName="./Ribbon/CustomRibbonLoader.lsp" PerDocument="True"/>
    </Components>
</ApplicationPackage>

 

 

 

 

This code loads the CUIX in AutoCAD 2020, 2021 ,2022, 2023... but unfortunately, not in 2024. I've tried loading my CUIX file manually with CUILOAD and doing so the panel appeared in the ribbon as always. 

 

I need to load the Pallete Panel automatically when the plugin is loaded, as I will not be able to alter manually the AutoCAD of the plugin users.

     

Is there any modification I can do to my LISP script in order to make it work with AutoCAD 2024?

 

Thanks in advance. 

Labels (4)
8 REPLIES 8
Message 2 of 9
paullimapa
in reply to: markhop1

Have you tried adding this lisp to startup suite content

https://help.autodesk.com/view/ACD/2024/ENU/?guid=GUID-B38F610B-51FB-4938-BDEC-A0A737F5DB6C


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 9
markhop1
in reply to: paullimapa


@paullimapa  ha escrito:

Have you tried adding this lisp to startup suite content


Hey @paullimapa , thanks for the suggestion.  I just tried to do so, but it is not working neither...

Also, this solution would not help me, as I need to load the Pallete Panel automatically when the plugin is loaded, as I will not be able to alter manually the AutoCAD of the plugin users... I will include this info in the main post. 

Message 4 of 9
paullimapa
in reply to: markhop1

In addition to adding the folder to Support File Search Paths did you also add the relevant folders to the trusted folders path?


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 5 of 9
markhop1
in reply to: paullimapa


@paullimapa  ha escrito:

In addition to adding the folder to Support File Search Paths did you also add the relevant folders to the trusted folders path?


Yeah, I placed the CUIX and the LISP files within the default trusted folder:

 

C:\Users\user\AppData\Roaming\Autodesk\ApplicationPlugins\CustomPlugin\Ribbon

 

Message 6 of 9
paullimapa
in reply to: markhop1

Have you tried instead of

"./CustomRibbon.cuix")

including the complete path to the location of the cuix? 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 7 of 9
paullimapa
in reply to: markhop1

FYI for your packages.xml to load follow this structure 

https://help.autodesk.com/view/OARX/2023/ENU/?guid=GUID-40F5E92C-37D8-4D54-9497-CD9F0659F9BB


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 8 of 9
Sea-Haven
in reply to: markhop1

Maybe this example for a method.

 

(setq Menu_Path "C:\\CAD-TOOLS\\") ; Path to Menu file
(setq Menu_Name "CAD-TOOLS") ; pop menu to load
(setq Group_Name "CADMENU") ; groupname assigned in .mnu or .mns file

(if (menugroup menu_Name)
(command "_MENUUNLOAD" menu_Name)
)
(setq cnt (vla-get-count(vla-get-menuGroups (vlax-get-acad-object))))
(if  (> (vl-string-search  "BRICSCAD" (strcase(getvar 'product))) 0)
(progn
(command "MENULOAD" (strcat Menu_Path Menu_Name ".cui"))
(menucmd (strcat "P" (rtos (+ cnt 1) 2 0) "=+" menu_Name ".POP1"))
)
(progn

(command "MENULOAD" (strcat Menu_Path Menu_Name ".cuix"))
(menucmd (strcat "P" (rtos (+ cnt 1) 2 0) "=+" menu_Name ".POP1"))
)
)

(alert "\n Menu loaded \n \n CAD TOOLS programs now installed")

 

 

Message 9 of 9
markhop1
in reply to: markhop1

Thanks, changing the script worked!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Customer Advisory Groups


Autodesk Design & Make Report