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






Windows & Linux

Description

Create an interval list by filtering intervals from original interval list using specified filtering method.

Syntax

[Visual Basic .NET]
Public Function CreateEventIntervalListFiltered( _
   ByVal Name As String, _
   ByVal Description As String _
) As IAgCrdnEventIntervalList
[C#]
public IAgCrdnEventIntervalList CreateEventIntervalListFiltered(
   string Name,
   string Description
);
[Managed C++]
public: IAgCrdnEventIntervalList^ CreateEventIntervalListFiltered(
   String __gc ^ Name,
   String __gc ^ Description
);
[Java]
public IAgCrdnEventIntervalList createEventIntervalListFiltered(
   String Name,
   String Description
);
[Unmanaged C++]
public: HRESULT CreateEventIntervalListFiltered(
   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 filtered event interval list.
[C#]Copy Code
IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFiltered("MyIntervalListFiltered",  "MyDescription"); 
IAgCrdnEventIntervalListFiltered listFiltered = intervalList as IAgCrdnEventIntervalListFiltered; 
 
listFiltered.OriginalIntervals = provider.EventIntervalLists["AttitudeIntervals"]; 
 
IAgCrdnFirstIntervalsFilter firstIntervals = listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterFirstIntervals) as IAgCrdnFirstIntervalsFilter; 
firstIntervals.MaximumNumberOfIntervals = 3
 
// Or for example satisfaction intervals 
IAgCrdnSatisfactionConditionFilter asSatisfactionCondition = listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterSatisfactionIntervals) as IAgCrdnSatisfactionConditionFilter; 
asSatisfactionCondition.Condition = provider.Conditions["BeforeStop"]; 
asSatisfactionCondition.DurationKind = AgECrdnIntervalDurationKind.eCrdnIntervalDurationKindAtLeast; 
 
// Uses current Time unit preference, this code snippet assumes seconds. 
asSatisfactionCondition.IntervalDuration = 30
 
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 filtered event interval list.
[Visual Basic .NET]Copy Code
Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFiltered("MyIntervalListFiltered", "MyDescription")
Dim listFiltered As IAgCrdnEventIntervalListFiltered = TryCast(intervalList, IAgCrdnEventIntervalListFiltered)

listFiltered.OriginalIntervals = provider.EventIntervalLists("AttitudeIntervals")

Dim firstIntervals As IAgCrdnFirstIntervalsFilter = TryCast(listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterFirstIntervals), IAgCrdnFirstIntervalsFilter)
firstIntervals.MaximumNumberOfIntervals = 3

' Or for example satisfaction intervals
Dim asSatisfactionCondition As IAgCrdnSatisfactionConditionFilter = TryCast(listFiltered.FilterFactory.Create(AgECrdnPruneFilter.eCrdnPruneFilterSatisfactionIntervals), IAgCrdnSatisfactionConditionFilter)
asSatisfactionCondition.Condition = provider.Conditions("BeforeStop")
asSatisfactionCondition.DurationKind = AgECrdnIntervalDurationKind.eCrdnIntervalDurationKindAtLeast

' Uses current Time unit preference, this code snippet assumes seconds.
asSatisfactionCondition.IntervalDuration = 30

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

© 2019 Analytical Graphics, Inc. All Rights Reserved.