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






Windows & Linux

Description

Creates an event that is either the start or stop time selected from a reference interval.

Syntax

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

[C#]
public IAgCrdnEvent CreateEventStartStopTime(
string Name,
string Description
);

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

[Java]
public IAgCrdnEvent createEventStartStopTime(
String Name,
String Description
);

[Unmanaged C++]
public: HRESULT CreateEventStartStopTime(
BSTR Name,
BSTR Description,
IAgCrdnEvent ** 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 start stop time event.
[C#] Copy Code
IAgCrdnEvent timeEvent = provider.Events.Factory.CreateEventStartStopTime("MyEventStartStopTime""MyDescription"); 
IAgCrdnEventStartStopTime asStartStopTime = timeEvent as IAgCrdnEventStartStopTime; 
 
asStartStopTime.ReferenceEventInterval = provider.EventIntervals["EphemerisTimeSpan"]; 
 
asStartStopTime.UseStart = true
 
IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence(); 
if (occurrence.IsValid) 

    Console.WriteLine("Event occurred at: " + occurrence.Epoch); 

 

Create and configure start stop time event.
[Visual Basic .NET] Copy Code
Dim timeEvent As IAgCrdnEvent = provider.Events.Factory.CreateEventStartStopTime("MyEventStartStopTime", "MyDescription")
Dim asStartStopTime As IAgCrdnEventStartStopTime = TryCast(timeEvent, IAgCrdnEventStartStopTime)

asStartStopTime.ReferenceEventInterval = provider.EventIntervals("EphemerisTimeSpan")

asStartStopTime.UseStart = True

Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()
If occurrence.IsValid Then
    Console.WriteLine("Event occurred at: " + occurrence.Epoch)
End If

See Also

© 2017 Analytical Graphics, Inc. All Rights Reserved.

STK 11.2.1 Programming Interface