ButtonDefinition vrs ControlDefinition

ButtonDefinition vrs ControlDefinition

dennis
Advisor Advisor
441 Views
1 Reply
Message 1 of 2

ButtonDefinition vrs ControlDefinition

dennis
Advisor
Advisor

I have found that when creating an Inventor GUI Popup using RibbonPanel.CommandControls.AddButtonPopup, the 

ObjectCollection buttonDefs = m_inventorApplication.TransientObjects.CreateObjectCollection() collection can contain the ButtonDefinition(s) or ControlDefinition(s).  Is there any reason to choose one over the other?  The ControlDefinition setup is an extra step, so I would opt for "keeping it simple" and use the ButtonDefinition unless there is a code preference someone knows of.

0 Likes
Accepted solutions (1)
442 Views
1 Reply
Reply (1)
Message 2 of 2

chandra.shekar.g
Autodesk Support
Autodesk Support
Accepted solution

@dennis,

 

Basically, ButtonDefinition is derived from control definitions as shown in below image. It means that all ButtonDefinitions are also ControlDefinitons.

 

class hierarchy.PNG

 

Please feel free to contact if there is any queries.

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



0 Likes