Environment.GetAllItemsUnderMouseCursor Method

Returns all the visible (on screen) and selectable items (which may include the parents stack for nested entities) under the mouse cursor in the active viewport.
Public Function GetAllItemsUnderMouseCursor( _ 
ByVal mousePos As Point, _ 
Optional ByVal selectableOnly As Boolean = true _ 
) As SelectedItem()
This language is not supported or no code example is available.
public SelectedItem[] GetAllItemsUnderMouseCursor( 
Point mousePos
bool selectableOnly = true 
)
This language is not supported or no code example is available.

Parameters

mousePos
Point

Mouse position in screen coordinates

selectableOnly
bool

When true, checks the <see cref="Entity.Selectable" /> property, otherwise no.

Return Value

SelectedItem[]

The list of entity indices.

Remarks
 
The sensitivity is affected by the <see cref="Environment.PickBoxSize" /> parameter. Only the items that are visible on screen and in the selectionBox are considered, the ones covered by other entities are not considered. The <see cref="Model.AssemblySelectionModes" /> determines whether the top level entities or nested entities are returned.

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition