AGI STK VGT 11 Send comments on this topic.
IAgCrdnEventIntervalScaled Interface





Description

Interval defined by scaling original interval using either absolute or relative scale. If resulting interval's start becomes after its stop, the interval becomes undefined.

Object Model


Public Properties

Public Property AbsoluteIncrement The absolute increment value which creates a interval by expanding (or shortening if negative) the original interval by shifting its start/stop times equally by half of specified increment value.
Public Property OriginalInterval The original interval.
Public Property RelativeIncrement The relative increment value from which absolute increment is obtained by multiplying relative value by interval duration. The resulting absolute increment creates a new interval by expanding (or shortening if negative) the original interval by shifting its start/stop times equally by half of specified increment value.
Public Property UseAbsoluteIncrement Specify whether to use absolute or relative increment.

Example

Create and configure scaled event interval.
[C#] Copy Code
IAgCrdnEventInterval eventInterval = provider.EventIntervals.Factory.CreateEventIntervalScaled("MyIntervalScaled",  "MyDescription"); 
IAgCrdnEventIntervalScaled asScaled = eventInterval as IAgCrdnEventIntervalScaled; 
 
asScaled.OriginalInterval = provider.EventIntervals["AvailabilityTimeSpan"]; 
 
asScaled.AbsoluteIncrement = 30
 
// Or use Relative 
asScaled.UseAbsoluteIncrement = false
asScaled.RelativeIncrement = 45// Percentage 
 
IAgCrdnEventIntervalResult intervalResult = eventInterval.FindInterval(); 
if (intervalResult.IsValid) 

    Console.WriteLine("Interval Start: " + intervalResult.Interval.Start); 
    Console.WriteLine("Interval Stop: " + intervalResult.Interval.Stop); 

 

Create and configure scaled event interval.
[Visual Basic .NET] Copy Code
Dim eventInterval As IAgCrdnEventInterval = provider.EventIntervals.Factory.CreateEventIntervalScaled("MyIntervalScaled", "MyDescription")
Dim asScaled As IAgCrdnEventIntervalScaled = TryCast(eventInterval, IAgCrdnEventIntervalScaled)

asScaled.OriginalInterval = provider.EventIntervals("AvailabilityTimeSpan")

asScaled.AbsoluteIncrement = 30

' Or use Relative
asScaled.UseAbsoluteIncrement = False
asScaled.RelativeIncrement = 45
' Percentage
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

CoClasses that Implement IAgCrdnEventIntervalScaled

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1