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





Windows & Linux

Description

Create an interval defined by shifting the specified reference interval by a fixed time offset.

Syntax

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

Parameters

Name
Description

See Also

Example

Create and configure time offset event interval.
[C#]
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalTimeOffset("MyIntervalFixedTimeOffset",  "MyDescription");
IAgCrdnEventIntervalTimeOffset asFixedTimeOffset = eventInterval as IAgCrdnEventIntervalTimeOffset;

asFixedTimeOffset.ReferenceInterval = provider.EventIntervals["AvailabilityTimeSpan"];

// Uses current Time unit preference, this code snippet assumes seconds.
asFixedTimeOffset.TimeOffset = 30;

IAgCrdnEventIntervalResult intervalResult = eventInterval.FindInterval();
if (intervalResult.IsValid)
{
    Console.WriteLine("Interval Start: " + intervalResult.Interval.Start);
    Console.WriteLine("Interval Stop: " + intervalResult.Interval.Stop);
}
Create and configure time offset event interval.
[Visual Basic .NET]
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalTimeOffset("MyIntervalFixedTimeOffset", "MyDescription")
Dim asFixedTimeOffset As IAgCrdnEventIntervalTimeOffset = TryCast(eventInterval, IAgCrdnEventIntervalTimeOffset)

asFixedTimeOffset.ReferenceInterval = provider.EventIntervals("AvailabilityTimeSpan")

' Uses current Time unit preference, this code snippet assumes seconds.
asFixedTimeOffset.TimeOffset = 30

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.