User Input Events

The ActivateCommand event notifies the client when a command has been invoked. Only _Post is available.

EventNames:

  • ActivateCommand_Post

Parameters

Type

Name

Description

String

commandName

The internal name of the command. This is the same name as the internal name of the ControlDefinition object associated with this command.

Examples:

ActivateCommand_Post:

Register-InventorEvent -EventName ActivateCommand_Post -Action 'PostActivateCommand'

function PostActivateCommand($commandName) {
	#Write event code here
}

The LinearMarkingMenu event fires before the overflow (linear marking) context menu is displayed to the user. Only _Pre is available.

EventNames:

  • LinearMarkingMenu_Pre

Parameters

Type

Name

Description

SelectionDeviceEnum

selectionDevice

Enumeration of the kind of UI used to select object.

Examples:

LinearMarkingMenu_Pre:

Register-InventorEvent -EventName LinearMarkingMenu_Pre -Action 'PreLinearMarkingMenu'

function PreLinearMarkingMenu($selectionDevice) {
	#Write event code here
}

The RadialMarkingMenu event fires before the radial marking menu is displayed to the user, or before the user gestures using the right mouse button. Only _Pre is available.

EventNames:

  • RadialMarkingMenu_Pre

Parameters

Type

Name

Description

SelectionDeviceEnum

selectionDevice

Enumeration of the kind of UI used to select object.

Examples:

RadialMarkingMenu_Pre:

Register-InventorEvent -EventName RadialMarkingMenu_Pre -Action 'PreRadialMarkingMenu'

function PreRadialMarkingMenu($selectionDevice) {
	#Write event code here
}

The DoubleClick event notifies the client when the user double-clicks in the Inventor window. Only _Post is available.

EventNames:

  • DoubleClick_Post

Parameters

Type

Name

Description

SelectionDeviceEnum

selectionDevice

Enumeration of the kind of UI used to select object.

MouseButtonEnum

button

Returns an enumerated constant that identifies the button that was clicked to cause the event.

ShiftKeys

shiftStateEnum

Returns an enumerated constant that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the button argument is clicked.

Examples:

DoubleClick_Post:

Register-InventorEvent -EventName DoubleClick_Post -Action 'PostDoubleClick'

function PostDoubleClick($selectionDevice, $button, $shiftStateEnum) {
	#Write event code here
}

The Drag event notifies the client whenever the end-user performs a drag operation in the graphics window. Using this event, the client can override Inventor’s standard drag behavior.
The first notification is sent when the drag starts (selection of the entity to be dragged). Inventor only keeps sending notifications while the mouse is dragged and when the mouse button is released if the drag is handled by the event; otherwise Inventor performs its standard drag behavior. Only _Post is available.

EventNames:

  • Drag_Post

Parameters

Type

Name

Description

DragStateEnum

dragState

Indicates the current state of the drag operation. When the drag is initially started this value is kDragStateDragHandlerSelection, indicating the selection of an entity to be dragged. During the drag, this value is kDragStateOnDrag. When the mouse button is released to stop the drag operation this value is kDragStateEndDrag.

ShiftKeys

shiftKeys

Returns an enumerated constant that corresponds to the state of the SHIFT, CTRL, and ALT keys when the button specified in the button argument is clicked.

Examples:

Drag_Post:

Register-InventorEvent -EventName Drag_Post -Action 'PostDrag'

function PostDrag($dragState, $shiftKeys) {
	#Write event code here
}

The TerminateCommand event notifies the client when a command has been terminated. Only _Post is available.
A command terminates when it finishes (for example after the extrusion is created by the Extrude command), when another command is started while it is active, or when the user presses the Escape key. View commands only suspend the active command and do not terminate it.

EventNames:

  • TerminateCommand_Post

Parameters

Type

Name

Description

String

commandName

The internal name of the command. This is the same name as the internal name of the ControlDefinition object associated with this command.

Remarks:

There are several things that cause a command to be terminated. When a command finishes it will terminate. For example when you execute the Extrude command, after the extrusion has finished the command terminates. Starting another command while one command is active will cause the active command to terminate. An exception to this is the viewing commands. They just temporarily suspend the active command rather than terminate it. Pressing the escape key will terminate the current command.

Examples:

TerminateCommand_Post:

Register-InventorEvent -EventName TerminateCommand_Post -Action 'PostTerminateCommand'

function PostTerminateCommand($commandName) {
	#Write event code here
}