User Input Events

The ActivateCommand event notifies the client when a command has been invoked.

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
}

Fires before the overflow context menu is displayed to the user.

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
}

Fires before the marking menu is displayed to the user or before the user gestures using the right mouse button.

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
}

Event that is sent when the user double-clicks in the window.

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.

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.

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.

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.

Examples:

TerminateCommand_Post:

Register-InventorEvent -EventName TerminateCommand_Post -Action 'PostTerminateCommand'

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