STK X Send comments on this topic.
PickInfo Method (AgUiAxVOCntrl)
See Also  Example
X
Specifies the x-coordinate of the point in windows coordinates of the control.
Y
Specifies the y-coordinate of the point in control coordinates.





Description

Get detailed information about a mouse pick.

Syntax

[Visual Basic .NET]
Public Function PickInfo( _
   ByVal X As Integer, _
   ByVal Y As Integer _
) As AgPickInfoData

[C#]
public AgPickInfoData PickInfo(
int X,
int Y
);

[Managed C++]
public: AgPickInfoData^ PickInfo(
int X,
int Y
);

[Java]
public AgPickInfoData pickInfo(
int X,
int Y
);

[Unmanaged C++]
public: HRESULT PickInfo(
long X,
long Y,
AgPickInfoData ** ReturnValue
);

Parameters

X
Specifies the x-coordinate of the point in windows coordinates of the control.
Y
Specifies the y-coordinate of the point in control coordinates.

Return Type

The PickInfo method processes the point clicked during a mouse pick and returns a AgPickInfoData object which contains (if available):

  • the corresponding 3D scene latitude, longitude and altitude;
  • the STK object clicked.

Remarks

The PickInfo method returns "Primitive ID: " when the AdvancedPickMode Property is set to true.

Example

[Visual Basic .NET] Copy Code
Sub VoPickInfo(ByVal Str As String, ByVal x As Single, ByVal y As Single)

    Dim pickInfoData As AGI.STKX.AgPickInfoData
    pickInfoData = Me.AxAgUiAxVOCntrl1.PickInfo(x, y)

    If pickInfoData.IsObjPathValid Then
        WriteMsg(Str & "Object: " & path)
    End If

    If pickInfoData.IsLatLonAltValid Then
        WriteMsg(Str & "LLA: " & Lat & " " & Lon & " " & Alt)
    End If

    pickInfoData = Nothing

End Sub

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1