ButtonDefinition Object
Description
The ButtonDefinition object represents any command whose user interface is a button.
Methods
AutoAddToGUI |
Adds it to AddIn Toolbar. |
Delete |
Method that deletes the UIDefinition Object. |
Execute |
Executes this ControlDefinition object. |
Execute2 |
Executes the ControlDefinition synchronously or asynchronously. |
Properties
Application |
Returns the top-level parent application object. When used the context of Inventor, an Application object is returned. When used in the context of Apprentice, an ApprenticeServer object is returned. |
BuiltIn |
Gets the BuiltIn status for a UIDefinition. |
Classification |
Gets the classification. |
ClientId |
Gets ClientID. |
CommandNotificationType |
Read-write property that gets and sets how to send the command notifications. This defaults to kBothNotifications when the ButtonDefinition is created. This property fails for built-in definitions. |
DefaultShortcut |
Gets/Sets the default (internal) shortcut assigned to the command. Setting this property fails for built-in ControlDefinitions. |
DefaultShortcutType |
Gets the type of default shortcut assigned to this command. Possible return values are kNoShortcut (no shortcut has been assigned), kAcceleratorShortcut (a shortcut that directly launches the command), or kAliasShortcut (a command alias). |
DefinitionType |
Gets the ControlDefinitionType. |
DescriptionText |
Gets/Sets Description Text. |
DisplayName |
Gets the Display Name. |
Enabled |
Enables/Disables the UIDefinition object. |
InternalName |
Gets the Internal Name. |
IntroducedInVersion |
Read-write property that gets and sets the introduced in version of the control definition. The values from AvailableComparisonVersions can be used to set this property. This is read only if the control definition is built-in. |
IsShortcutOverridden |
Gets whether the default (internal) shortcut has been overridden by the user or through the API. |
LargeIcon |
Gets/Sets LargeIcon. |
LastUpdatedVersion |
Read-write property that gets and sets the last updated version of the control definition. The values from AvailableComparisonVersions can be used to set this property. This is read only if the control definition is built-in. |
OverrideShortcut |
Gets/Sets the override shortcut assigned to the command. Setting this property to a null string clears the override. |
OverrideShortcutType |
Gets the type of override shortcut assigned to this command. Possible return values are kNoShortcut (no shortcut has been assigned), kAcceleratorShortcut (a shortcut that directly launches the command), or kAliasShortcut (a command alias). |
Parent |
Gets the parent object from whom this object can logically be reached. |
Pressed |
Gets/Sets Pressed property. |
ProgressiveToolTip |
Returns a ProgressiveToolTip object providing access to enhanced tooltip display for controls in the ribbon interface. |
StandardIcon |
Gets/Sets StandardIcon. |
ToolTipText |
Gets/Sets Tooltip. |
Type |
Returns an ObjectTypeEnum indicating this object's type. |
Events
OnExecute |
Event that fires when the ButtonDefinition is executed. |
OnHelp |
Event that is fired when the user selects F1 while the progressive tooltip of this command is being displayed in the ribbon interface. |
Accessed From
ControlDefinitions.AddButtonDefinition
Samples
Version
Introduced in version 6