AGI STK VGT 11 Send comments on this topic.
CreateEventIntervalListTimeOffset Method (IAgCrdnEventIntervalListFactory)
See Also  Example
Name
Description





Description

Create an interval list defined by shifting the specified reference interval list by a fixed time offset.

Syntax

[Visual Basic .NET]
Public Function CreateEventIntervalListTimeOffset( _
   ByVal Name As String, _
   ByVal Description As String _
) As IAgCrdnEventIntervalList

[C#]
public IAgCrdnEventIntervalList CreateEventIntervalListTimeOffset(
string Name,
string Description
);

[Managed C++]
public: IAgCrdnEventIntervalList^ CreateEventIntervalListTimeOffset(
String __gc ^ Name,
String __gc ^ Description
);

[Java]
public IAgCrdnEventIntervalList createEventIntervalListTimeOffset(
String Name,
String Description
);

[Unmanaged C++]
public: HRESULT CreateEventIntervalListTimeOffset(
BSTR Name,
BSTR Description,
IAgCrdnEventIntervalList ** ReturnValue
);

Parameters

Name
Description

Remarks

Spaces and most punctuation ( except for "-_().") cannot be used as a part of a component name when creating new components via VGT API.

Example

Create and configure time offset event interval list.
[C#] Copy Code
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListTimeOffset("MyIntervalListFixedTimeOffset",  "MyDescription"); 
IAgCrdnEventIntervalListTimeOffset asTimeOffset = intervalList as IAgCrdnEventIntervalListTimeOffset; 
 
asTimeOffset.ReferenceIntervals = provider.EventIntervalLists["AfterStart.SatisfactionIntervals"]; 
 
// Uses current Time unit preference, this code snippet assumes seconds. 
asTimeOffset.TimeOffset = 300
 
IAgCrdnIntervalListResult intervals = intervalList.FindIntervals(); 
if (intervals.IsValid) 

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

 

Create and configure time offset event interval list.
[Visual Basic .NET] Copy Code
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListTimeOffset("MyIntervalListFixedTimeOffset", "MyDescription")
Dim asTimeOffset As IAgCrdnEventIntervalListTimeOffset = TryCast(intervalList, IAgCrdnEventIntervalListTimeOffset)

asTimeOffset.ReferenceIntervals = provider.EventIntervalLists("AfterStart.SatisfactionIntervals")

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

Dim intervals As IAgCrdnIntervalListResult = intervalList.FindIntervals()
If intervals.IsValid Then
    For Each interval As IAgCrdnInterval In intervals.Intervals
        Console.WriteLine("Start: " + interval.Start)
        Console.WriteLine("Stop: " + interval.[Stop])
    Next
End If

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1