AGI STK VGT 11 Send comments on this topic.
CreateEventIntervalListFile Method (IAgCrdnEventIntervalListFactory)
See Also  Example
Name
Description
Filepath
A path to an existing file.





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
);

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

[Unmanaged C++]
public: HRESULT CreateEventIntervalListFile(
BSTR Name,
BSTR Description,
BSTR Filepath,
IAgCrdnEventIntervalList ** ReturnValue
);

Parameters

Name
Description
Filepath
A path to an existing file.

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 list from file.
[C#] Copy Code
// 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] Copy Code
' 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

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1