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





Description

Create an interval using specified start and stop time instants.

Syntax

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

[C#]
public IAgCrdnEventInterval CreateEventIntervalBetweenTimeInstants(
string Name,
string Description
);

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

[Java]
public IAgCrdnEventInterval createEventIntervalBetweenTimeInstants(
String Name,
String Description
);

[Unmanaged C++]
public: HRESULT CreateEventIntervalBetweenTimeInstants(
BSTR Name,
BSTR Description,
IAgCrdnEventInterval ** 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 event interval between two instants.
[C#] Copy Code
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalBetweenTimeInstants("MyIntervalBetweenTwoInstants",  "MyDescription"); 
IAgCrdnEventIntervalBetweenTimeInstants asTimeInstant = eventInterval as IAgCrdnEventIntervalBetweenTimeInstants; 
 
asTimeInstant.StartTimeInstant = provider.Events["EphemerisStartTime"]; 
asTimeInstant.StopTimeInstant = provider.Events["EphemerisStopTime"]; 
 
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 between two instants.
[Visual Basic .NET] Copy Code
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalBetweenTimeInstants("MyIntervalBetweenTwoInstants", "MyDescription")
Dim asTimeInstant As IAgCrdnEventIntervalBetweenTimeInstants = TryCast(eventInterval, IAgCrdnEventIntervalBetweenTimeInstants)

asTimeInstant.StartTimeInstant = provider.Events("EphemerisStartTime")
asTimeInstant.StopTimeInstant = provider.Events("EphemerisStopTime")

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

See Also

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1