SelectEvents.OnPreSelect Event
Parent Object: SelectEventsDescription
Fires signaling that a particular object has been indicated as a potential candidate for selection.
Remarks
This event is fired before the object is highlighted, giving the programmer the opportunity to apply further custom filtering. By responding with False to the DoHighlight argument, the object will not be available for selection and the UI behaves as if the object was never considered for selection.Syntax
SelectEvents.OnPreSelect( PreSelectEntity As Object, DoHighlight As Boolean, MorePreSelectEntities As ObjectCollection, SelectionDevice As SelectionDeviceEnum, ModelPosition As Point, ViewPosition As Point2d, View As View )Parameters
Name | Type | Description |
PreSelectEntity | Object | Input/Output. When called, Inventor returns the entity the mouse is currently over. The client though has a chance to change this entity to some other, if so desired. The entity passed back from the call is the one Inventor will highlight for the pre-select. |
DoHighlight | Boolean | Input value that specifies whether the entity should be available for selection or not. If True, this signifies a successful pre-selection and the entity is highlighted by Inventor. |
MorePreSelectEntities | ObjectCollection | Input argument through which you can supply a group of objects that are logically pre-selected along with the one that Inventor found on its own. This argument is ignored if DoHighLight is False. Inventor passes in an empty collection that you can add additional entities to. |
SelectionDevice | SelectionDeviceEnum | Returns a constant denoting whether the selection was made via a pick in a graphics window or was it by a pick in the browser or by some other means. An object can also be selected programmatically by calling the selection simulation methods on the CommandManager. A value of kGraphicsWindowSelection indicates it was selected in a graphic window. For all other values the View, ModelPosition, and ViewPosition arguments are meaningless. |
ModelPosition | Point | Returns the coordinates that result from projecting the click point onto the selected entity. This is returned in centimeters relative to model space. Applicable only when the SelectionDevice argument is kGraphicsWindowSelection. |
ViewPosition | Point2d | Returns the coordinates that specify the current location of the mouse pointer in window space and are returned in pixels. Applicable only when the SelectionDevice argument is kGraphicsWindowSelection. |
View | View | Returns the View |