STK Vector Geometry ToolSend comments on this topic.
CreateEventIntervalFromIntervalList Method (IAgCrdnEventIntervalFactory)
See Also
Name
Description
Windows





Windows & Linux

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
);
[Unmanaged C++]
public: HRESULT CreateEventIntervalFromIntervalList(
    BSTR Name,
    BSTR Description,
    IAgCrdnEventInterval ** ppRetVal
);
[Java]
public IAgCrdnEventInterval createEventIntervalFromIntervalList(
    String Name,
    String Description
);
[Python - STK API ]
def CreateEventIntervalFromIntervalList(self, Name:str, Description:str) -> "IAgCrdnEventInterval":

Parameters

Name
Description

See Also

Example

Create and configure event interval from an interval list.
[C#]
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]
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
© 2024 Analytical Graphics, Inc. All Rights Reserved.