Opens the item closest to a 3D position, within a specified search radius, making it the current open Item.
Visual Basic |
---|
Public Function OpenClosestItem( _ ByVal x As Double, _ ByVal y As Double, _ ByVal z As Double, _ ByVal r As Double, _ ByVal stat As String, _ ByVal filter As String _ ) As Integer |
"I" | All Items. |
"V" | Visible, Hittable and Editable Items. |
"H" | Hittable and Editable Items. |
"E" | Editable Items only. |
It is important to know that OpenClosestItem will either require Lat and Lon or X and Y as input depending on the axis type of the current CRS. This can be found by evaluating the GetAxesType function.
You may have to experiment with the search radius to ensure that items are selected in a timely manner.
Available: GEO MM ME MD OD OM OV SISpy
Group:
Dim
dX AsDouble
Dim dY AsDouble
Dim dZ AsDouble
Dim iAxis AsInteger = sis.GetAxesType()
If iAxis = 0 Then
dX = SIS.GetFlt(SIS_OT_CURITEM, 0, "_ox#")
dY = SIS.GetFlt(SIS_OT_CURITEM, 0, "_oy#")
dZ = SIS.GetFlt(SIS_OT_CURITEM, 0, "_oz#")
EndIf
If iAxis = 1 Then
dX = SIS.GetFlt(SIS_OT_CURITEM, 0, "_oLon#")
dY = SIS.GetFlt(SIS_OT_CURITEM, 0, "_oLat#")
dZ = SIS.GetFlt(SIS_OT_CURITEM, 0, "_oz#")
EndIf
sis.OpenClosestItem (dX, dY, dZ, dRad, "I", "NamedFilter")
Send comments on this topic.
Click to return to www.cadcorp.com
© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).