AGI STK Util 11 Send comments on this topic.
QuerySphericalArray Method (IAgPosition)
See Also  Example





Description

This method is similar to QuerySpherical but can be used by earlybound(c#, vb.net...) and latebound(scripting languages) clients. The array returns the values in the order Latitude(index 0), Longitude(index 1) and Radius(index 2).

Syntax

[Visual Basic .NET]
Public Function QuerySphericalArray() As System.Array

[C#]
public System.Array QuerySphericalArray();

[Managed C++]
public: System::Array QuerySphericalArray();

[Java]
public Object[] querySphericalArray();

[Unmanaged C++]
public: HRESULT QuerySphericalArray(
SAFEARRAY ** Array
);

Example

This example shows how to get the spherical position of a facility using the QuerySphericalArray in vbscript.
Retrieving spherical coordinates of a facility [VBScript] Copy Code
set pos = facility.Position
sphericalArray = pos.QuerySphericalArray()
lat = sphericalArray(0) 'Latitude
lon = sphericalArray(1) 'Longitude
rad = sphericalArray(2) 'Radius

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1