Environment.FindClosestVertex (Point, Double, Type, HitVertex) Method

Looks for the model vertex whose 2D screen projection is closer to the mouse cursor skipping entities different from entType.
Public Function FindClosestVertex( _ 
ByVal mousePos As Point, _ 
ByVal maxDistance As Double, _ 
ByVal entType As Type, _ 
ByRef closestVertex As HitVertex
) As Integer
This language is not supported or no code example is available.
public int FindClosestVertex( 
Point mousePos
double maxDistance
Type entType
out HitVertex closestVertex 
)
This language is not supported or no code example is available.

Parameters

mousePos
Point

Mouse position (zero on top)

maxDistance
double

Limit the search to points at this distance in pixels from mouse cursor position

entType
Type

The type of entities to process

closestVertex
HitVertex

The closest vertex, with the full information to retrieve the vertex from a Brep or Solid

Return Value

int

The entity index if the closest vertex is nearer than maxDistance and the entity type is entType, -1 otherwise.

Remarks
 
The closestVertex point is in the coordinate space of the EntityList.CurrentBlockReference so, if there is a current BlockReference, to get the 3D world coordinates of the closestVertex point you need to transform it by the EntityList.CurrentTransformation.

.NET Framework

Supported in: 4.5, 4.6, 4.7

In this article

Definition