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





Windows & Linux

Description

Create an interval of fixed duration specified using start and stop offsets relative to specified reference time instant.

Syntax

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

Parameters

Name
Description

See Also

Example

Create and configure fixed duration event interval.
[C#]
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalFixedDuration("MyIntervalFixedDuration",  "MyDescription");
IAgCrdnEventIntervalFixedDuration asFixedDuration = eventInterval as IAgCrdnEventIntervalFixedDuration;

asFixedDuration.ReferenceTimeInstant = provider.Events["AvailabilityStartTime"];

// Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StartOffset = 10;

// Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StopOffset = 360;

IAgCrdnEventIntervalResult intervalResult = eventInterval.FindInterval();
if (intervalResult.IsValid)
{
    Console.WriteLine("Interval Start: " + intervalResult.Interval.Start);
    Console.WriteLine("Interval Stop: " + intervalResult.Interval.Stop);
}
Create and configure fixed duration event interval.
[Visual Basic .NET]
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalFixedDuration("MyIntervalFixedDuration", "MyDescription")
Dim asFixedDuration As IAgCrdnEventIntervalFixedDuration = TryCast(eventInterval, IAgCrdnEventIntervalFixedDuration)

asFixedDuration.ReferenceTimeInstant = provider.Events("AvailabilityStartTime")

' Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StartOffset = 10

' Uses current Time unit preference, this code snippet assumes seconds.
asFixedDuration.StopOffset = 360

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