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





Description

Create an interval list by merging two constituent interval lists using specified logical operation.

Syntax

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

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

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

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

[Unmanaged C++]
public: HRESULT CreateEventIntervalListMerged(
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 merged event interval list.
[C#] Copy Code
IAgCrdnProvider satelliteVgtProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt; 
IAgCrdnProvider aircraftVgtProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt; 
 
IAgCrdnEventIntervalList intervalList = satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListMerged("MyIntervalListMerged",  "MyDescription"); 
IAgCrdnEventIntervalListMerged asListMerged = intervalList as IAgCrdnEventIntervalListMerged; 
 
asListMerged.SetIntervalListA(satelliteVgtProvider.EventIntervalLists["AvailabilityIntervals"]); 
asListMerged.SetIntervalListB(aircraftVgtProvider.EventIntervalLists["AvailabilityIntervals"]); 
asListMerged.MergeOperation = AgECrdnEventListMergeOperation.eCrdnEventListMergeOperationMINUS; 
 
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 merged event interval list.
[Visual Basic .NET] Copy Code
Dim satelliteVgtProvider As IAgCrdnProvider = stkRoot.GetObjectFromPath("Satellite/LEO").Vgt
Dim aircraftVgtProvider As IAgCrdnProvider = stkRoot.GetObjectFromPath("Aircraft/UAV").Vgt

Dim intervalList As IAgCrdnEventIntervalList = satelliteVgtProvider.EventIntervalLists.Factory.CreateEventIntervalListMerged("MyIntervalListMerged", "MyDescription")
Dim asListMerged As IAgCrdnEventIntervalListMerged = TryCast(intervalList, IAgCrdnEventIntervalListMerged)

asListMerged.SetIntervalListA(satelliteVgtProvider.EventIntervalLists("AvailabilityIntervals"))
asListMerged.SetIntervalListB(aircraftVgtProvider.EventIntervalLists("AvailabilityIntervals"))
asListMerged.MergeOperation = AgECrdnEventListMergeOperation.eCrdnEventListMergeOperationMINUS

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