AGI STK VGT 11 Send comments on this topic.
FindOccurrence Method (IAgCrdnEvent)
See Also  Example





Description

Return computed time instance if it occurs.

Syntax

[Visual Basic .NET]
Public Function FindOccurrence() As IAgCrdnEventFindOccurrenceResult

[C#]
public IAgCrdnEventFindOccurrenceResult FindOccurrence();

[Managed C++]
public: IAgCrdnEventFindOccurrenceResult^ FindOccurrence();

[Java]
public IAgCrdnEventFindOccurrenceResult findOccurrence();

[Unmanaged C++]
public: HRESULT FindOccurrence(
IAgCrdnEventFindOccurrenceResult ** ReturnValue
);

Example

Determine the time of an event.
[C#] Copy Code
IAgCrdnEvent timeEvent = provider.Events["PassIntervals.First.Start"]; 
 
IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence(); 
 
if (occurrence.IsValid) 

    Console.WriteLine("The first pass interval happened at: " + occurrence.Epoch); 

else 

    Console.WriteLine("The first pass interval never occurred"); 

 

Determine the time of an event.
[Visual Basic .NET] Copy Code
Dim timeEvent As IAgCrdnEvent = provider.Events("PassIntervals.First.Start")

Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()

If occurrence.IsValid Then
    Console.WriteLine("The first pass interval happened at: " + occurrence.Epoch)
Else
    Console.WriteLine("The first pass interval never occurred")
End If

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1