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





Description

Create an interval of fixed duration specified using start and stop offsets relative to specified reference time instant.

Syntax

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

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

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

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

[Unmanaged C++]
public: HRESULT CreateEventIntervalFixedDuration(
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 fixed duration event interval.
[C#] Copy Code
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalFixedDuration("MyIntervalFixedDuration",  "MyDescription"); 
IAgCrdnEventIntervalFixedDuration asFixedDuration = eventInterval as IAgCrdnEventIntervalFixedDuration; 
 
asFixedDuration.ReferenceTimeInstant = provider.Events["AvailabilityStartTime"]; 
 
// Uses current Time unit preference, this code snippet assumes seconds. 
asFixedDuration.StartOffset = 10
 
// Uses current Time unit preference, this code snippet assumes seconds. 
asFixedDuration.StopOffset = 360
 
IAgCrdnEventIntervalResult intervalResult = eventInterval.FindInterval(); 
if (intervalResult.IsValid) 

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

 

Create and configure fixed duration event interval.
[Visual Basic .NET] Copy Code
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalFixedDuration("MyIntervalFixedDuration", "MyDescription")
Dim asFixedDuration As IAgCrdnEventIntervalFixedDuration = TryCast(eventInterval, IAgCrdnEventIntervalFixedDuration)

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

' Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StartOffset = 10

' Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StopOffset = 360

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