Abstract class for creating CommandButtons. Implement the abstract methods and properties
in a new class to utilize.
public abstract class CommandButtonTemplate :
InventorCode.AddinPack.IUiTemplate
Inheritance System.Object 🡒 CommandButtonTemplate
Implements IUiTemplate
Constructors | |
---|---|
CommandButtonTemplate(Application, string) | Command button template constructor. |
Properties | |
---|---|
buttonDisplay | The button display style for the command. This must be overridden in the extending class. |
classification | The classification of the command button; define as a Inventor.CommandTypesEnum. This must be overridden in the extending class. |
descriptionText | The description of the command button. This must be overridden in the extending class. |
displayName | The name of the command button as it will appear in the UI. This must be overridden in the extending class. |
internalName | The internal name of the command button. Must be unique across the Inventor Application. This must be overridden in the extending class. |
LargeIconImage | The large icon image for the command button. This must be overridden in the extending class. |
LargeIconImageDark | The large icon image for the command button when in dark mode. This must be overridden in the extending class. |
SmallIconImage | The small icon image for the command button. This must be overridden in the extending class. |
SmallIconImageDark | The small icon image for the command button when in dark mode. This must be overridden in the extending class. |
toolTipText | The tooltip text of the command button. This must be overridden in the extending class. |
Methods | |
---|---|
BuildUserInterface() | The method to execute when Inventor builds the user interface. Place code that creates ribbon buttons, etc here. This is typically done by calling the CommandButtonTemplate.CreateRibbonButton() method. This must be overridden in the extending class. |
CreateRibbonButton(string, string, string, string, string) | This method inserts the command button into the Inventor ribbon UI. This is typically called from the CommandBUttonTemplate.BuildUserInterface() method. |
Execute() | The method to execute when the command button is clicked. This must be overridden in the extending class. |