AGI STK Objects 11 Send comments on this topic.
ExecElements Method (IAgDataPrvInterval)
See Also  Example
StartTime
The start time of the interval.
StopTime
The stop time of the interval.
ElementNames
An array of element names.





Description

Compute the data and return just the indicated data elements; interval data providers require an interval or list of intervals. StartTime/StopTime use DateFormat Dimension.

Syntax

[Visual Basic .NET]
Public Function ExecElements( _
   ByVal StartTime As System.Object, _
   ByVal StopTime As System.Object, _
   ByRef ElementNames As System.Array _
) As IAgDrResult

[C#]
public IAgDrResult ExecElements(
System.Object StartTime,
System.Object StopTime,
ref System.Array ElementNames
);

[Managed C++]
public: IAgDrResult^ ExecElements(
VARIANT StartTime,
VARIANT StopTime,
System::Array ^^ ElementNames
);

[Java]
public IAgDrResult execElements(
Variant StartTime,
Variant StopTime,
Object[] ElementNames
);

[Unmanaged C++]
public: HRESULT ExecElements(
VARIANT StartTime,
VARIANT StopTime,
SAFEARRAY ** ElementNames,
IAgDrResult ** ReturnValue
);

Parameters

StartTime
The start time of the interval.
StopTime
The stop time of the interval.
ElementNames
An array of element names.

Return Type

IAgDrResult.

Example

[Visual Basic .NET] Copy Code
Dim ElemNames() As String = {"Start Time", "Stop Time"}
ADR = app.Children("Scenario1").Children("Satellite1").DataProviders("Eclipse Times").ExecElements( _
                                                            "1 Jun 2004 12:00:00.00", _
                                                            "1 Jun 2004 13:00:00.00", _
                                                            ElemNames)
Execute an interval data provider (for instance access times) and returning only the specified elements
[C#] Copy Code
IAgStkAccess access = satellite.GetAccessToObject(areatarget) as IAgStkAccess; 
access.ComputeAccess(); 
 
IAgDataPrvInterval dp = access.DataProviders["Access Data"as IAgDataPrvInterval; 
 
Array elems = new object[] 
              { 
                  "Start Time"
                  "Stop Time"
                  "Access Number"
                  "From Pass Number"
                  "To Pass Number"
                  "From Start Alt"
                  "From Stop Alt" 
              }; 
 
// ExecElements expects the third parameter to be a one dimensional array of element names 
IAgDrResult resInfo = dp.ExecElements( 
    "1 Jan 2012 12:00:00.000"
    "2 Jan 2012 12:00:00.000"
    ref elems); 
 

Execute an interval data provider (for instance access times) and returning only the specified elements
[Visual Basic .NET] Copy Code
Dim access As IAgStkAccess = TryCast(satellite.GetAccessToObject(areatarget), IAgStkAccess)
access.ComputeAccess()

Dim dp As IAgDataPrvInterval = TryCast(access.DataProviders("Access Data"), IAgDataPrvInterval)

#If Not CSToJava Then
#Else
#End If
Dim elems As Array = New Object() {"Start Time", "Stop Time", "Access Number", "From Pass Number", "To Pass Number", "From Start Alt", _
    "From Stop Alt"}

' ExecElements expects the third parameter to be a one dimensional array of element names
#If Not CSToJava Then
Dim resInfo As IAgDrResult = dp.ExecElements("1 Jan 2012 12:00:00.000", "2 Jan 2012 12:00:00.000", elems)
#Else
#End If

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1