STK Vector Geometry ToolSend comments on this topic.
CreateEventIntervalListFile Method (IAgCrdnEventIntervalListFactory)
See Also
Name
Description
FilePath
A path to an existing file.
Windows





Windows & Linux

Description

Create an interval list based on specified interval file.

Syntax

[Visual Basic .NET]
Public Function CreateEventIntervalListFile( _
    ByVal Name As String, _
    ByVal Description As String, _
    ByVal FilePath As String _
) As IAgCrdnEventIntervalList
[C#]
public IAgCrdnEventIntervalList CreateEventIntervalListFile(
    string Name,
    string Description,
    string FilePath
);
[Managed C++]
public: IAgCrdnEventIntervalList^ CreateEventIntervalListFile(
    String __gc ^ Name,
    String __gc ^ Description,
    String __gc ^ FilePath
);
[Unmanaged C++]
public: HRESULT CreateEventIntervalListFile(
    BSTR Name,
    BSTR Description,
    BSTR FilePath,
    IAgCrdnEventIntervalList ** ppRetVal
);
[Java]
public IAgCrdnEventIntervalList createEventIntervalListFile(
    String Name,
    String Description,
    String FilePath
);
[Python - STK API ]
def CreateEventIntervalListFile(self, Name:str, Description:str, FilePath:str) -> "IAgCrdnEventIntervalList":

Parameters

Name
Description
FilePath
A path to an existing file.

See Also

Example

Create and configure event interval list from file.
[C#]
// Example contents of a file
//
//  STK.V.10.0
//
//  BEGIN IntervalList
//      ScenarioEpoch 1 Jul 1999 00:00:00.00
//      DATEUNITABRV UTCG
//
//  BEGIN Intervals
//      "1 Jul 1999 00:00:00.00" "1 Jul 1999 02:00:00.00"
//      "1 Jul 1999 05:00:00.00" "1 Jul 1999 07:00:00.00"
//      "1 Jul 1999 11:00:00.00" "1 Jul 1999 13:00:00.00"
//      "1 Jul 1999 17:00:00.00" "1 Jul 1999 19:00:00.00"
//  END Intervals
//
//  END IntervalList

IAgCrdnEventIntervalList intervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFile("MyIntervalListFromFile", "MyDescription", intervalFile);
IAgCrdnEventIntervalListFile asListFile = intervalList as IAgCrdnEventIntervalListFile;

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 event interval list from file.
[Visual Basic .NET]
' Example contents of a file
'
'  STK.V.10.0
'
'  BEGIN IntervalList
'      ScenarioEpoch 1 Jul 1999 00:00:00.00
'      DATEUNITABRV UTCG
'
'  BEGIN Intervals
'      "1 Jul 1999 00:00:00.00" "1 Jul 1999 02:00:00.00"
'      "1 Jul 1999 05:00:00.00" "1 Jul 1999 07:00:00.00"
'      "1 Jul 1999 11:00:00.00" "1 Jul 1999 13:00:00.00"
'      "1 Jul 1999 17:00:00.00" "1 Jul 1999 19:00:00.00"
'  END Intervals
'
'  END IntervalList

Dim intervalList As IAgCrdnEventIntervalList = provider.EventIntervalLists.Factory.CreateEventIntervalListFile("MyIntervalListFromFile", "MyDescription", intervalFile)
Dim asListFile As IAgCrdnEventIntervalListFile = TryCast(intervalList, IAgCrdnEventIntervalListFile)

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
© 2024 Analytical Graphics, Inc. All Rights Reserved.