ButtonDefinition Object


Description

The ButtonDefinition object represents any command whose user interface is a button.

Methods

Name Description
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

Name Description
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.
DefaultShortcut
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
DisplayName Gets the Display Name.
Enabled
InternalName Gets the Internal Name.
IntroducedInVersion
IsShortcutOverridden Gets whether the default (internal) shortcut has been overridden by the user or through the API.
LargeIcon
LastUpdatedVersion
OverrideShortcut
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
ProgressiveToolTip Returns a ProgressiveToolTip object providing access to enhanced tooltip display for controls in the ribbon interface.
StandardIcon
ToolTipText
Type Returns an ObjectTypeEnum indicating this object's type.

Events

Name Description
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

Name Description
Add commands to the application menu Demonstrates adding command to the application menu.
Creation of an override environment for a document A new ribbon tab is created and associated with the override environment.
Create a ribbon panel in an existing tab Demonstrates creating a new ribbon panel within an existing ribbon tab.

Version

Introduced in version 6