STK Vector Geometry ToolSend comments on this topic.
CreateEventArrayExtrema Method (IAgCrdnEventArrayFactory)
See Also
Name
Description
Windows





Windows & Linux

Description

Create an event array by determining times of local minimum and/or maximum of specified scalar calculation.

Syntax

[Visual Basic .NET]
Public Function CreateEventArrayExtrema( _
    ByVal Name As String, _
    ByVal Description As String _
) As IAgCrdnEventArray
[C#]
public IAgCrdnEventArray CreateEventArrayExtrema(
    string Name,
    string Description
);
[Managed C++]
public: IAgCrdnEventArray^ CreateEventArrayExtrema(
    String __gc ^ Name,
    String __gc ^ Description
);
[Unmanaged C++]
public: HRESULT CreateEventArrayExtrema(
    BSTR Name,
    BSTR Description,
    IAgCrdnEventArray ** ppRetVal
);
[Java]
public IAgCrdnEventArray createEventArrayExtrema(
    String Name,
    String Description
);
[Python - STK API ]
def CreateEventArrayExtrema(self, Name:str, Description:str) -> "IAgCrdnEventArray":

Parameters

Name
Description

See Also

Example

Create and configure extrema event array.
[C#]
IAgCrdnEventArray eventArray = provider.EventArrays.Factory.CreateEventArrayExtrema("MyEventArrayExtrema",  "MyDescription");
IAgCrdnEventArrayExtrema asExtrema = eventArray as IAgCrdnEventArrayExtrema;

asExtrema.Calculation = provider.CalcScalars["GroundTrajectory.Detic.LLA.Altitude"];

asExtrema.IsGlobal = true;
asExtrema.ExtremumType = AgECrdnExtremumConstants.eCrdnExtremumMaximum;

IAgCrdnFindTimesResult timeArrays = eventArray.FindTimes();
if (timeArrays.IsValid)
{
    Console.WriteLine("Times");
    int numTimes = timeArrays.Times.GetLength(0);
    for (int i = 0; i < numTimes; ++i)
    {
        Console.WriteLine(timeArrays.Times.GetValue(i));
    }

    foreach (IAgCrdnInterval timeArray in timeArrays.Intervals)
    {
        Console.WriteLine("Start: " + timeArray.Start);
        Console.WriteLine("Stop: " + timeArray.Stop);
    }
}
Create and configure extrema event array.
[Visual Basic .NET]
Dim eventArray As IAgCrdnEventArray = provider.EventArrays.Factory.CreateEventArrayExtrema("MyEventArrayExtrema", "MyDescription")
Dim asExtrema As IAgCrdnEventArrayExtrema = TryCast(eventArray, IAgCrdnEventArrayExtrema)

asExtrema.Calculation = provider.CalcScalars("GroundTrajectory.Detic.LLA.Altitude")

asExtrema.IsGlobal = True
asExtrema.ExtremumType = AgECrdnExtremumConstants.eCrdnExtremumMaximum

Dim timeArrays As IAgCrdnFindTimesResult = eventArray.FindTimes()
If timeArrays.IsValid Then
	Console.WriteLine("Times")
	Dim numTimes As Integer = timeArrays.Times.GetLength(0)
	Dim i As Integer = 0
	While i < numTimes
		Console.WriteLine(timeArrays.Times.GetValue(i))
		System.Threading.Interlocked.Increment(i)
	End While

	For Each timeArray As IAgCrdnInterval In timeArrays.Intervals
		Console.WriteLine("Start: " + timeArray.Start)
		Console.WriteLine("Stop: " + timeArray.[Stop])
	Next
End If
© 2024 Analytical Graphics, Inc. All Rights Reserved.