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





Description

Create an interval from a specified interval list by using one of several selection methods.

Syntax

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

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

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

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

[Unmanaged C++]
public: HRESULT CreateEventIntervalFromIntervalList(
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 event interval from an interval list.
[C#] Copy Code
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalFromIntervalList("MyIntervalList",  "MyDescription"); 
IAgCrdnEventIntervalFromIntervalList asIntervalList = eventInterval as IAgCrdnEventIntervalFromIntervalList; 
 
asIntervalList.ReferenceIntervals = provider.EventIntervalLists["AttitudeIntervals"]; 
asIntervalList.IntervalSelection = AgECrdnIntervalSelection.eCrdnIntervalSelectionMaxGap; 
 
// Or from start... 
asIntervalList.IntervalSelection = AgECrdnIntervalSelection.eCrdnIntervalSelectionFromStart; 
asIntervalList.IntervalNumber = 1
 
IAgCrdnEventIntervalResult intervalResult = eventInterval.FindInterval(); 
if (intervalResult.IsValid) 

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

 

Create and configure event interval from an interval list.
[Visual Basic .NET] Copy Code
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalFromIntervalList("MyIntervalList", "MyDescription")
Dim asIntervalList As IAgCrdnEventIntervalFromIntervalList = TryCast(eventInterval, IAgCrdnEventIntervalFromIntervalList)

asIntervalList.ReferenceIntervals = provider.EventIntervalLists("AttitudeIntervals")
asIntervalList.IntervalSelection = AgECrdnIntervalSelection.eCrdnIntervalSelectionMaxGap

' Or from start...
asIntervalList.IntervalSelection = AgECrdnIntervalSelection.eCrdnIntervalSelectionFromStart
asIntervalList.IntervalNumber = 1

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