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






Windows & Linux

Description

Create an interval defined between two explicitly specified start and stop times.

Syntax

[Visual Basic .NET]
Public Function CreateEventIntervalFixed( _
   ByVal Name As String, _
   ByVal Description As String _
) As IAgCrdnEventInterval
[C#]
public IAgCrdnEventInterval CreateEventIntervalFixed(
   string Name,
   string Description
);
[Managed C++]
public: IAgCrdnEventInterval^ CreateEventIntervalFixed(
   String __gc ^ Name,
   String __gc ^ Description
);
[Java]
public IAgCrdnEventInterval createEventIntervalFixed(
   String Name,
   String Description
);
[Unmanaged C++]
public: HRESULT CreateEventIntervalFixed(
   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 event interval.
[C#]Copy Code
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalFixed("MyIntervalFixed",  "MyDescription"); 
IAgCrdnEventIntervalFixed asFixed = eventInterval as IAgCrdnEventIntervalFixed; 
 
asFixed.SetInterval( 
    provider.Events["AvailabilityStartTime"].FindOccurrence().Epoch, 
    provider.Events["AvailabilityStopTime"].FindOccurrence().Epoch); 
 
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 event interval.
[Visual Basic .NET]Copy Code
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalFixed("MyIntervalFixed", "MyDescription")
Dim asFixed As IAgCrdnEventIntervalFixed = TryCast(eventInterval, IAgCrdnEventIntervalFixed)

asFixed.SetInterval(provider.Events("AvailabilityStartTime").FindOccurrence().Epoch, provider.Events("AvailabilityStopTime").FindOccurrence().Epoch)

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

© 2019 Analytical Graphics, Inc. All Rights Reserved.