AGI STK VGT 11Send comments on this topic.
CreateEventIntervalScaled Method (IAgCrdnEventIntervalFactory)
See Also  Example
Name
Description
Windows






Windows & Linux

Description

Create an interval by scaling an original interval using either absolute or relative scale.

Syntax

[Visual Basic .NET]
Public Function CreateEventIntervalScaled( _
   ByVal Name As String, _
   ByVal Description As String _
) As IAgCrdnEventInterval
[C#]
public IAgCrdnEventInterval CreateEventIntervalScaled(
   string Name,
   string Description
);
[Managed C++]
public: IAgCrdnEventInterval^ CreateEventIntervalScaled(
   String __gc ^ Name,
   String __gc ^ Description
);
[Java]
public IAgCrdnEventInterval createEventIntervalScaled(
   String Name,
   String Description
);
[Unmanaged C++]
public: HRESULT CreateEventIntervalScaled(
   BSTR Name,
   BSTR Description,
   IAgCrdnEventInterval ** ReturnValue
);

Parameters

Name
Description

Remarks

Spaces and most punctuation ( except for "-_().") cannot be used as a part of a component name when creating new components via VGT API.

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

See Also

© 2019 Analytical Graphics, Inc. All Rights Reserved.