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






Windows & Linux

Description

A single time interval.

Object Model


Public Methods

Public Method FindIntervalReturn computed interval if it exists.
Public Method OccurredDetermine if specified time falls within computed interval if it exists.

Public Properties

Public Property LabelStartA label associated with the interval start.
Public Property LabelStartDescriptionThe start description.
Public Property LabelStopA label associated with the interval stop.
Public Property LabelStopDescriptionThe stop description.
Public Property TypeReturn the type of interval.

Example

Determine if event occurred in interval.
[C#]Copy Code
// The event you are interested in. 
IAgCrdnEventInterval timeEventInterval = provider.EventIntervals["LightingIntervals.Sunlight.First"]; 
 
// The reference event you want to determine if event occurred in the interval. 
IAgCrdnEvent timeEvent = provider.Events["GroundTrajectory.Detic.LLA.Altitude.TimeOfMax"]; 
IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence(); 
 
if (occurrence.IsValid) 

    if (timeEventInterval.Occurred(occurrence.Epoch)) 
    { 
        Console.WriteLine("Our highest altitude was reached on the first lighting pass"); 
    } 
    else 
    { 
        Console.WriteLine("Our highest altitude was not reached on the first lighting pass"); 
    } 

 

Determines the start and stop times of the event interval.
[C#]Copy Code
IAgCrdnEventInterval eventInterval = provider.EventIntervals["AvailabilityTimeSpan"]; 
 
IAgCrdnEventIntervalResult interval = eventInterval.FindInterval(); 
 
if (interval.IsValid) 

    Console.WriteLine("Interval Start: " + interval.Interval.Start); 
    Console.WriteLine("Interval Stop: " + interval.Interval.Stop); 

 

Determines the event intervals contained in the interval collection.
[C#]Copy Code
IAgCrdnEventIntervalCollection intervalCollection = provider.EventIntervalCollections["LightingIntervals"]; 
 
IAgCrdnIntervalsVectorResult intervalResult = intervalCollection.FindIntervalCollection(); 
if (intervalResult.IsValid) 

    foreach (IAgCrdnIntervalCollection intervals in intervalResult.IntervalCollections) 
    { 
        foreach (IAgCrdnInterval interval in intervals) 
        { 
            Console.WriteLine("Start: " + interval.Start); 
            Console.WriteLine("Start: " + interval.Stop); 
        } 
    } 

 

Determine if event occurred in interval.
[Visual Basic .NET]Copy Code
' The event you are interested in.
Dim timeEventInterval As IAgCrdnEventInterval = provider.EventIntervals("LightingIntervals.Sunlight.First")

' The reference event you want to determine if event occurred in the interval.
Dim timeEvent As IAgCrdnEvent = provider.Events("GroundTrajectory.Detic.LLA.Altitude.TimeOfMax")
Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()

If occurrence.IsValid Then
    If timeEventInterval.Occurred(occurrence.Epoch) Then
        Console.WriteLine("Our highest altitude was reached on the first lighting pass")
    Else
        Console.WriteLine("Our highest altitude was not reached on the first lighting pass")
    End If
End If

Determines the start and stop times of the event interval.
[Visual Basic .NET]Copy Code
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals("AvailabilityTimeSpan")

Dim interval As IAgCrdnEventIntervalResult = eventInterval.FindInterval()

If interval.IsValid Then
    Console.WriteLine("Interval Start: " + interval.Interval.Start)
    Console.WriteLine("Interval Stop: " + interval.Interval.[Stop])
End If

Determines the event intervals contained in the interval collection.
[Visual Basic .NET]Copy Code
Dim intervalCollection As IAgCrdnEventIntervalCollection = provider.EventIntervalCollections("LightingIntervals")

Dim intervalResult As IAgCrdnIntervalsVectorResult = intervalCollection.FindIntervalCollection()
If intervalResult.IsValid Then
    For Each intervals As IAgCrdnIntervalCollection In intervalResult.IntervalCollections
        For Each interval As IAgCrdnInterval In intervals
            Console.WriteLine("Start: " + interval.Start)
            Console.WriteLine("Start: " + interval.[Stop])
        Next
    Next
End If

CoClasses that Implement IAgCrdnEventInterval

© 2018 Analytical Graphics, Inc. All Rights Reserved.