The OnDrag 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.
Name | Type | Description |
DragState | DragStateEnum | indicating 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 | ShiftStateEnum | A value indicating what combinations of the Shift, Control, and Alt keys are currently pressed. This allows you to use combinations of these keys to control options for the command implementing the drag. For example, a Control drag might result in copying the entity. |
ModelPosition | Point | The current position of the mouse in model space. |
ViewPosition | Point2d | The current position of the mouse in view space. The coordinates are pixels where the upper-left corner of the view is (0,0). |
View | View | The View object the drag is taking place within. |
AdditionalInfo | NameValueMap | Input object that contains additional information about why the context menu is being displayed. No additional information is provided for this event. |
HandlingCode | HandlingCodeEnum | Output that indicates how you are handling the event. Setting this argument to kEventHandled results in turning off Inventor's standard behavior for the drag operation and causing additional OnDrag event notifications to be sent as the end-user continues the drag operation. By responding to these events the client can define their own behavior for the entity being dragged. Setting this to kEventNotHandled will cause Inventor to use its standard drag behavior for the entity being dragged. kEventCanceled is not supported and will result in the same behavior as kEventNotHandled. |