Load Partial CUI

Load Partial CUI

Anonymous
Not applicable
1,466 Views
5 Replies
Message 1 of 6

Load Partial CUI

Anonymous
Not applicable

Hello!

 

Is only way to load partial cui file, with interop (com)?

 

Is there some .net api for that "job"?

 

(I want to autoload my own *.cuix file from directory)

 

Best regards

Danijel

0 Likes
1,467 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Found solution on

 

http://www.theswamp.org/index.php?topic=16024.0

 

 

Best regards,

Danijel

0 Likes
Message 3 of 6

Anonymous
Not applicable

 

When we solve one problem, than we find new :-)!

 

How we can know, Is cui already loaded...

 

Bestr regards,

Danijel

0 Likes
Message 4 of 6

Anonymous
Not applicable
0 Likes
Message 5 of 6

Alex.Baird
Community Visitor
Community Visitor

 

I found a solution using the Autodesk.AutoCAD.Customization.CustomizationSection class. It has a PartialCuiFiles property and the relevent functions there are: Contains, Add, and Save.

 

CustomizationSection mainCui = new CustomizationSection(Application.GetSystemVariable("MENUNAME") + ".cuix"); will get you a CustomizationSection for the current main cuix file and from there the rest is straight forward.

0 Likes
Message 6 of 6

Anonymous
Not applicable

Try this - it gets the commandMethod tag and icon and builds the menu.

0 Likes