Share

CommandManager Object


Description

The CommandManager object provides functionality that interacts with the various user interaction events. See here for an overview.

Methods

Name Description
ClearPrivateEvents Clears the contents of Autodesk Inventor's internal clipboard.
CreateDragContext Method that creates a new DragContext object.
CreateInteractionEvents Method that creates and returns a new InteractionEvents object. The InteractionEvents object is created for document that is currently active.
CreateMiniToolbar Method that creates a MiniToolbar object.
DoPreSelect Method that causes Autodesk Inventor to go through the pre-selection protocol, including firing of corresponding event out the active InteractionEvents object if one is active. If a native Autodesk Inventor command is active and is in a selection mode, it gets the pre-select notification just like a native pre-selection happened. This method is useful when you want to perform picking outside of the graphic window. For example if you have a browser that has icons that represent selectable objects you can cause the selection behavior to happen as the user navigates through your browser and selects objects.
DoSelect Method that causes Autodesk Inventor to go through the selection protocol, including firing of corresponding event out the active InteractionEvents object if one is active. If a native Autodesk Inventor command is active and is in a selection mode, it gets the select notification just like a native selection happened. This method is useful when you want to perform picking outside of the graphic window. For example if you have a browser that has icons that represent selectable objects you can cause the selection behavior to happen as the user navigates through your browser and selects objects.
DoStopPreSelect Method that causes Autodesk Inventor to go through the stop pre-selection protocol, including firing of corresponding event out the active InteractionEvents object if one is active. If a native Autodesk Inventor command is active and is in a selection mode, it gets the stop pre-select notification just like a native stop pre-selection happened. This method is useful when you want to perform picking outside of the graphic window. For example if you have a browser that has icons that represent selectable objects you can cause the selection behavior to happen as the user navigates through your browser and selects objects.
DoUnSelect Method that causes Autodesk Inventor to go through the de-selection protocol, including firing of corresponding event out the active InteractionEvents object if one is active. If a native Autodesk Inventor command is active and is in a selection mode, it gets the de-select notification just like a native de-selection happened. This method is useful when you want to perform picking outside of the graphic window. For example if you have a browser that has icons that represent selectable objects you can cause the selection behavior to happen as the user navigates through your browser and selects objects.
PeekPrivateEvent Method that queries data contained by Autodesk Inventor's internal clipboard.
Pick Method that allows the user to pick a single entity.
PostPrivateEvent Method that posts data onto Autodesk Inventor's internal clipboard. Certain commands that usually obtain information using a dialog, i.e. Open, Save, etc., look first to see if data is on the clipboard before displaying the dialog. If valid information is on the clipboard the command will use it instead of displaying the dialog and asking the user to specify the filename.
PromptMessage This method allows the developer to put up prompt messages (unless the user has suppressed this prompt) much like the Visual Basic MsgBox functionality.
StartExecutable Method that causes the specified executable to be run. Using the Parameters argument you can also pass arguments to the executable.
StopActiveCommand Method that causes the currently running command to be terminated.

Properties

Name Description
ActiveCommand Gets the active command (one that is currently running).
CommandCategories Property that returns the collection.
ControlDefinitions Property that returns the ControlDefinitions collection.
Parent Property that returns the parent document of the object.
SelectionActive Property that informs the client if Autodesk Inventor is currently in selection mode or not. This may be used, for example, by clients to test if calling the DoSelect (and related) methods will have any effect or not.
Type Returns an ObjectTypeEnum indicating this object's type.
UserInputEvents Property that returns the object that fires events on all user input (commands, keyboard, mouse, etc.).

Accessed From

Application.CommandManager, ButtonDefinition.Parent, ComboBoxDefinition.Parent, CommandCategory.Parent, ControlDefinition.Parent, InteractionEvents.Parent, MacroControlDefinition.Parent, UserInputEvents.Parent

Samples

Name Description
Add commands to the application menu Demonstrates adding command to the application menu.
Single selection - simple The following sample demonstrates getting a single selection from the user.
Replace content center part This sample demonstrates how to replace the content part referenced by an assembly occurrence.
Copy a sketch This sample demonstrates copying the contents of a sketch into another sketch via the API.
Print list of all Inventor Commands This sample prints the internal names and descriptions of all commands (aka ControlDefinitions) in Inventor.
Creation of an override environment for a document A new ribbon tab is created and associated with the override environment.
Post Private Event Sample This sample demonstrates how to use the PostPrivateEvent to configure the options for placing a part component.
Create a ribbon panel in an existing tab Demonstrates creating a new ribbon panel within an existing ribbon tab.
Window Selection This sample demonstrates using the selection events to window-select multiple edges. Selection is dependent on events and VB only supports events within a class module.
Copy sketch contents This sample shows how to copy the contents of one sketch to another.
Cancel a double click Demonstrates how to receive (and in this case, cancel) a double click from a user.
OnDrag Event - dragging a WorkPoint This sample demonstrates the use of the OnDrag event to drag fixed work points when no command is active. This sample only allows drags parallel to the X-Y plane. This sample is dependent on events and VB only supports events within a class module.

Version

Introduced in version 4

Was this information helpful?