AGI STK VGT 11 Send comments on this topic.
Occurred Method (IAgCrdnEventIntervalList)
See Also  Example
Epoch
Specify an epoch. The method may throw an exception if the epoch parameter specified cannot be converted to a currently selected date unit.





Description

Determine if speified time falls within computed interval list.

Syntax

[Visual Basic .NET]
Public Function Occurred( _
   ByVal Epoch As System.Object _
) As Boolean

[C#]
public bool Occurred(
System.Object Epoch
);

[Managed C++]
public: bool Occurred(
VARIANT Epoch
);

[Java]
public bool occurred(
Variant Epoch
);

[Unmanaged C++]
public: HRESULT Occurred(
VARIANT Epoch,
VARIANT_BOOL * ReturnValue
);

Parameters

Epoch
Specify an epoch. The method may throw an exception if the epoch parameter specified cannot be converted to a currently selected date unit.

Example

Determine if epoch occured in interval collection.
[C#] Copy Code
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists["AttitudeIntervals"]; 
 
// The reference event you want to determine if event of interest happened before. 
IAgCrdnEvent timeEvent = provider.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMin"]; 
IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence(); 
 
if (intervalList.Occurred(occurrence.Epoch)) 

    Console.WriteLine("The time of maximum altitude occurred in event interval list."); 

else 

    Console.WriteLine("The time of maximum altitude did not occurred in event interval list."); 

 

Determine if epoch occured in interval collection.
[Visual Basic .NET] Copy Code
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists("AttitudeIntervals")

' The reference event you want to determine if event of interest happened before.
Dim timeEvent As IAgCrdnEvent = provider.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMin")
Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()

If intervalList.Occurred(occurrence.Epoch) Then
    Console.WriteLine("The time of maximum altitude occurred in event interval list.")
Else
    Console.WriteLine("The time of maximum altitude did not occurred in event interval list.")
End If

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1