AGI STK VGT 11Send comments on this topic.
SetStartEpochAndDuration Method (IAgCrdnEventIntervalSmartInterval)
See Also  Example
RefStartEpoch
DurationStr
Windows






Windows & Linux

Description

Sets the interval's start epoch and the interval's duration.

Syntax

[Visual Basic .NET]
Public Sub SetStartEpochAndDuration( _
   ByVal RefStartEpoch As IAgCrdnEventSmartEpoch, _
   ByVal DurationStr As String _
) 
[C#]
public void SetStartEpochAndDuration(
   IAgCrdnEventSmartEpoch RefStartEpoch,
   string DurationStr
);
[Managed C++]
public: void SetStartEpochAndDuration(
   IAgCrdnEventSmartEpoch ^ RefStartEpoch,
   String __gc ^ DurationStr
);
[Java]
public  setStartEpochAndDuration(
   IAgCrdnEventSmartEpoch RefStartEpoch,
   String DurationStr
);
[Unmanaged C++]
public: HRESULT SetStartEpochAndDuration(
   IAgCrdnEventSmartEpoch * RefStartEpoch,
   BSTR DurationStr
);

Parameters

RefStartEpoch
DurationStr

Example

Configure the smart interval epoch and the duration.
[C#]Copy Code
// Change the time interval to 1 week after the dependent interval. 
IAgCrdnEventSmartEpoch epochOfInterest = smartInterval.GetStopEpoch(); 
smartInterval.SetStartEpochAndDuration(epochOfInterest, "+1 week"); 
 
// Or if you want a specific time, use SetStartTimeAndDuration. 
smartInterval.SetStartTimeAndDuration("1 Jan 2015 16:00:00.000""+1 day"); 
 
// You can find the event times, such as 
Console.WriteLine("Start Time: " + smartInterval.FindStartTime()); 
Console.WriteLine("Stop Time: " + smartInterval.FindStopTime()); 
Console.WriteLine("Duration: " + smartInterval.DurationAsString); // Note, only works if you specified duration. 
 

Configure the smart interval epoch and the duration.
[Visual Basic .NET]Copy Code
' Change the time interval to 1 week after the dependent interval.
Dim epochOfInterest As IAgCrdnEventSmartEpoch = smartInterval.GetStopEpoch()
smartInterval.SetStartEpochAndDuration(epochOfInterest, "+1 week")

' Or if you want a specific time, use SetStartTimeAndDuration.
smartInterval.SetStartTimeAndDuration("1 Jan 2015 16:00:00.000", "+1 day")

' You can find the event times, such as
Console.WriteLine("Start Time: " + smartInterval.FindStartTime())
Console.WriteLine("Stop Time: " + smartInterval.FindStopTime())
Console.WriteLine("Duration: " + smartInterval.DurationAsString)
' Note, only works if you specified duration.

See Also

© 2018 Analytical Graphics, Inc. All Rights Reserved.