AGI STK VGT 11 Send comments on this topic.
IAgCrdnEventTimeOffset Interface
Windows






Windows & Linux

Description

Event at fixed offset from specified reference event.

Object Model


Public Properties

Public Property ReferenceTimeInstant The reference time instant.
Public Property TimeOffset This property is deprecated. The time offset from the ReferenceTimeInstant. The value is always in seconds.
Public Property TimeOffset2 The time offset from the ReferenceTimeInstant. The value is in \'TimeUnit\' dimension.

Example

Create and configure fixed time offset event.
[C#] Copy Code
IAgCrdnEvent timeEvent = provider.Events.Factory.CreateEventTimeOffset("MyEventTimeOffset""MyDescription"); 
IAgCrdnEventTimeOffset asTimeOffset = timeEvent as IAgCrdnEventTimeOffset; 
 
asTimeOffset.ReferenceTimeInstant = provider.Events["AvailabilityStartTime"]; 
 
// Uses current Time unit preference, this code snippet assumes seconds. 
asTimeOffset.TimeOffset = 3
 
IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence(); 
if (occurrence.IsValid) 

    Console.WriteLine("Event occurred at: " + occurrence.Epoch); 

 

Create and configure fixed time offset event.
[Visual Basic .NET] Copy Code
Dim timeEvent As IAgCrdnEvent = provider.Events.Factory.CreateEventTimeOffset("MyEventTimeOffset", "MyDescription")
Dim asTimeOffset As IAgCrdnEventTimeOffset = TryCast(timeEvent, IAgCrdnEventTimeOffset)

asTimeOffset.ReferenceTimeInstant = provider.Events("AvailabilityStartTime")

' Uses current Time unit preference, this code snippet assumes seconds.
asTimeOffset.TimeOffset = 3

Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()
If occurrence.IsValid Then
    Console.WriteLine("Event occurred at: " + occurrence.Epoch)
End If

CoClasses that Implement IAgCrdnEventTimeOffset

© 2017 Analytical Graphics, Inc. All Rights Reserved.

STK 11.2.1 Programming Interface