AGI STK VGT 11 Send comments on this topic.
IAgCrdnEventArrayStartStopTimes Interface





Description

Defined by taking start and/or stop times of every interval in specified reference interval list and adding them to array. The array is then bounded by single interval spanning specified reference interval list. If the reference interval list is empty then so is this array.

Object Model


Public Properties

Public Property ReferenceIntervals The reference interval list.
Public Property StartStopOption The edge type. At least one of the two edge types must be selected.

Example

Create and configure start stop times event array.
[C#] Copy Code
IAgCrdnEventArray eventArray = provider.EventArrays.Factory.CreateEventArrayStartStopTimes("MyEventArrayStartStopTimes",  "MyDescription"); 
IAgCrdnEventArrayStartStopTimes asStartStopTimes = eventArray as IAgCrdnEventArrayStartStopTimes; 
 
asStartStopTimes.ReferenceIntervals = provider.EventIntervalLists["LightingIntervals.Sunlight"]; 
asStartStopTimes.StartStopOption = AgECrdnStartStopOption.eCrdnStartStopOptionCountStartOnly; 
 
IAgCrdnFindTimesResult timeArrays = eventArray.FindTimes(); 
if (timeArrays.IsValid) 

    Console.WriteLine("Times"); 
    int numTimes = timeArrays.Times.GetLength(0); 
    for (int i = 0; i < numTimes; ++i) 
    { 
        Console.WriteLine(timeArrays.Times.GetValue(i)); 
    } 
 
    foreach (IAgCrdnInterval timeArray in timeArrays.Intervals) 
    { 
        Console.WriteLine("Start: " + timeArray.Start); 
        Console.WriteLine("Stop: " + timeArray.Stop); 
    } 

 

Create and configure start stop times event array.
[Visual Basic .NET] Copy Code
Dim eventArray As IAgCrdnEventArray = provider.EventArrays.Factory.CreateEventArrayStartStopTimes("MyEventArrayStartStopTimes", "MyDescription")
Dim asStartStopTimes As IAgCrdnEventArrayStartStopTimes = TryCast(eventArray, IAgCrdnEventArrayStartStopTimes)

asStartStopTimes.ReferenceIntervals = provider.EventIntervalLists("LightingIntervals.Sunlight")
asStartStopTimes.StartStopOption = AgECrdnStartStopOption.eCrdnStartStopOptionCountStartOnly

Dim timeArrays As IAgCrdnFindTimesResult = eventArray.FindTimes()
If timeArrays.IsValid Then
    Console.WriteLine("Times")
    Dim numTimes As Integer = timeArrays.Times.GetLength(0)
    Dim i As Integer = 0
    While i <>
        Console.WriteLine(timeArrays.Times.GetValue(i))
        System.Threading.Interlocked.Increment(i)
    End While

    For Each timeArray As IAgCrdnInterval In timeArrays.Intervals
        Console.WriteLine("Start: " + timeArray.Start)
        Console.WriteLine("Stop: " + timeArray.[Stop])
    Next
End If

CoClasses that Implement IAgCrdnEventArrayStartStopTimes

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1