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






Windows & Linux

Description

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

Syntax

[Visual Basic .NET]
Public Function QueryCartesianArray() As System.Array
[C#]
public System.Array QueryCartesianArray();
[Managed C++]
public: System::Array QueryCartesianArray();
[Java]
public Object[] queryCartesianArray();
[Unmanaged C++]
public: HRESULT QueryCartesianArray(
   SAFEARRAY ** Array
);

Return Type

A one dimensional array containing three values X, Y and Z.

Example

This example shows how to get the cartesian position of a facility using the QueryCartesianArray in vbscript.
Retrieving cartesian coordinates of a facility [VBScript]Copy Code
set pos = facility.Position
cartArray = pos.QueryCartesianArray()
x = cartArray(0) ' X
y = cartArray(1) ' Y
z = cartArray(2) ' Z

See Also

© 2018 Analytical Graphics, Inc. All Rights Reserved.