.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programatically Adding a Partial.cui does not showup in the Menus

2 REPLIES 2
Reply
Message 1 of 3
||||||||||
300 Views, 2 Replies

Programatically Adding a Partial.cui does not showup in the Menus

I have created a partial cui with my menus & toolbars.
I then install it into the acad.cui by the following code...

CustomizationSection acadcui = new CustomizationSection(acad_fp);
CustomizationSection swatchdigitalcui = new CustomizationSection(swatchdigital_fp);

if (acadcui.PartialCuiFiles.Contains(swatchdigital_fp) == false)
{
acadcui.PartialCuiFiles.Add(swatchdigital_fp);
acadcui.Save();
}


This does in face add the partial.cui into the main cui but....
It does not activate-it does not add the menu to the main menus.
Where I open the customize dialog, the file is listed but will only show up if I manually press 'Apply'.
I've tryed RefreshWorkspace(), MakeDirty(), etc.

Do you have any idea hope I can get the menu to show up programmatially without having th resort to writing them into the acad.cui directly?

Thanks,
CM
2 REPLIES 2
Message 2 of 3
robinzhou
in reply to: ||||||||||

You can try to unload the main cui file and reload the main cui file with sendstringtoexecute
Message 3 of 3
||||||||||
in reply to: ||||||||||

Interesting.
I know SendStringtoExecute.
I tryed sending CUI... but this just opened the CUI Dialog.

May I ask, what command do I send to unload & reload the main cui?

Thanks,
CM

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost