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






Windows & Linux

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

© 2018 Analytical Graphics, Inc. All Rights Reserved.