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






Windows & Linux

Description

Return computed time instance if it occurs.

Syntax

[Visual Basic .NET]
Public Function FindOccurrence() As 
[C#]
public IAgCrdnEventFindOccurrenceResult FindOccurrence();
[Managed C++]
public: IAgCrdnEventFindOccurrenceResult ^ FindOccurrence();
[Java]
public IAgCrdnEventFindOccurrenceResult findOccurrence();
[Unmanaged C++]
public: HRESULT FindOccurrence(
    IAgCrdnEventFindOccurrenceResult ** ppRetVal
);

See Also

Example

Determine the time of an event.
[C#]
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]
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
© 2019 Analytical Graphics, Inc. All Rights Reserved.