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





Windows & Linux

Description

Creates an event set at a specified date/time.

Syntax

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

Parameters

Name
Description

See Also

Example

Create and configure fixed epoch event.
[C#]
IAgCrdnEvent timeEvent = provider.Events.Factory.CreateEventEpoch("MyEventFixed", "MyDescription");
IAgCrdnEventEpoch asEpoch = timeEvent as IAgCrdnEventEpoch;

// Epoch can be set explicitly (Uses current DateTime unit preference, this code snippet assumes UTCG)
asEpoch.Epoch = "1 May 2016 04:00:00.000";

// Epoch can also be set with the epoch of another event
IAgCrdnEventFindOccurrenceResult startTime = provider.Events["AvailabilityStartTime"].FindOccurrence();
asEpoch.Epoch = startTime.Epoch;

IAgCrdnEventFindOccurrenceResult occurrence = timeEvent.FindOccurrence();
if (occurrence.IsValid)
{
    Console.WriteLine("Event occurred at: " + occurrence.Epoch);
}
Create and configure fixed epoch event.
[Visual Basic .NET]
Dim timeEvent As IAgCrdnEvent = provider.Events.Factory.CreateEventEpoch("MyEventFixed", "MyDescription")
Dim asEpoch As IAgCrdnEventEpoch = TryCast(timeEvent, IAgCrdnEventEpoch)

' Epoch can be set explicitly (Uses current DateTime unit preference, this code snippet assumes UTCG)
asEpoch.Epoch = "1 May 2016 04:00:00.000"

' Epoch can also be set with the epoch of another event
Dim startTime As IAgCrdnEventFindOccurrenceResult = provider.Events("AvailabilityStartTime").FindOccurrence()
asEpoch.Epoch = startTime.Epoch

Dim occurrence As IAgCrdnEventFindOccurrenceResult = timeEvent.FindOccurrence()
If occurrence.IsValid Then
	Console.WriteLine("Event occurred at: " + occurrence.Epoch)
End If
© 2024 Analytical Graphics, Inc. All Rights Reserved.