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





Description

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

Syntax

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

[C#]
public IAgCrdnEventInterval CreateEventIntervalTimeOffset(
string Name,
string Description
);

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

[Java]
public IAgCrdnEventInterval createEventIntervalTimeOffset(
String Name,
String Description
);

[Unmanaged C++]
public: HRESULT CreateEventIntervalTimeOffset(
BSTR Name,
BSTR Description,
IAgCrdnEventInterval ** 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.
[C#] Copy Code
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalTimeOffset("MyIntervalFixedTimeOffset",  "MyDescription"); 
IAgCrdnEventIntervalTimeOffset asFixedTimeOffset = eventInterval as IAgCrdnEventIntervalTimeOffset; 
 
asFixedTimeOffset.ReferenceInterval = provider.EventIntervals["AvailabilityTimeSpan"]; 
 
// Uses current Time unit preference, this code snippet assumes seconds. 
asFixedTimeOffset.TimeOffset = 30
 
IAgCrdnEventIntervalResult intervalResult = eventInterval.FindInterval(); 
if (intervalResult.IsValid) 

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

 

Create and configure time offset event interval.
[Visual Basic .NET] Copy Code
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalTimeOffset("MyIntervalFixedTimeOffset", "MyDescription")
Dim asFixedTimeOffset As IAgCrdnEventIntervalTimeOffset = TryCast(eventInterval, IAgCrdnEventIntervalTimeOffset)

asFixedTimeOffset.ReferenceInterval = provider.EventIntervals("AvailabilityTimeSpan")

' Uses current Time unit preference, this code snippet assumes seconds.
asFixedTimeOffset.TimeOffset = 30

Dim intervalResult As IAgCrdnEventIntervalResult = eventInterval.FindInterval()
If intervalResult.IsValid Then
    Console.WriteLine("Interval Start: " + intervalResult.Interval.Start)
    Console.WriteLine("Interval Stop: " + intervalResult.Interval.[Stop])
End If

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1