|
Description
|
Returns the number of the nearest entity to the point with x,y coordinates.
|
|
Syntax
|
[Value&]=[form.]DXFReader.GetEntity (x As Single, y As Single)
|
|
Remarks
|
Use this function to retrieve an entity with a mouse click.
The following code will show the entity type of the nearest entity to the mouse pointer:
Dim EntityNum as Long
Private Sub DXFReader1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
EntityNum = DXFReader1.GetEntity(X, Y)
If EntityNum > 0 Then
MsgBox "Entity type: " + DXFReader1.Entities(EntityNum).EntityType
End If
End Sub
With this function you can retrieve the entities of the following types:
The parameters for the GetEntity method are described below:
| x | X coordinate of the point | | y | Y coordinate of the point |
|