AGI STK VGT 11Send comments on this topic.
Create Method (IAgCrdnCalcScalarFactory)
See Also  Example
Name
Component's name. The name must not have spaces.
Description
Component's optional description.
Type
Windows






Windows & Linux

Description

Creates and registers a scalar calculation using specified name, description, and type.

Syntax

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

Parameters

Name
Component's name. The name must not have spaces.
Description
Component's optional description.
Type
MemberValueDescription
eCrdnCalcScalarTypeUnknown-1Unknown or unsupported calculation scalar types
eCrdnCalcScalarTypeAngle0Scalar equal to angular displacement obtained from any angle in VGT.
eCrdnCalcScalarTypeFixedAtTimeInstant1Constant scalar created by evaluating input scalar calculation at specified reference time instant.
eCrdnCalcScalarTypeConstant2Constant scalar value of specified dimension.
eCrdnCalcScalarTypeDataElement3Any time-dependent data element from STK data providers available for parent STK object.
eCrdnCalcScalarTypeDerivative4Derivative of input scalar calculation.
eCrdnCalcScalarTypeElapsedTime5Time elapsed since reference time instant.
eCrdnCalcScalarTypeFile6Tabulated scalar calculation data loaded from specified file.
eCrdnCalcScalarTypeFunction7Defined by performing one of specified functions on input scalar.
eCrdnCalcScalarTypeIntegral8Integral of input scalar computed with respect to time using one of specified numerical methods and using one of specified accumulation types.
eCrdnCalcScalarTypeFunction2Var9Defined by performing one of specified binary operations on two scalar arguments.
eCrdnCalcScalarTypeVectorMagnitude10Scalar equal to magnitude of specified vector.
eCrdnCalcScalarTypePlugin11A calc scalar plugin based on a COM object.
eCrdnCalcScalarTypeCustomScript12A calc scalar uses scripted algorithm in MATLAB (.m or .dll), Perl or VBScript to define its value and rate.
eCrdnCalcScalarTypeSurfaceDistanceBetweenPoints13Surface distance along the specified central body ellipsoid between two points (or their respective projections if specified at altitude).

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 a calc scalar constant.
[C#]Copy Code
//Create a calc scalar constant. 
IAgCrdnCalcScalarConstant calcScalar = (IAgCrdnCalcScalarConstant)provider.CalcScalars.Factory.Create( 
    "CalcScalarName""Calc scalar constant.", AgECrdnCalcScalarType.eCrdnCalcScalarTypeConstant); 
 

Create a calc scalar constant.
[Visual Basic .NET]Copy Code
'Create a calc scalar constant.
Dim calcScalar As IAgCrdnCalcScalarConstant = DirectCast(provider.CalcScalars.Factory.Create("CalcScalarName", "Calc scalar constant.", AgECrdnCalcScalarType.eCrdnCalcScalarTypeConstant), IAgCrdnCalcScalarConstant)

See Also

© 2019 Analytical Graphics, Inc. All Rights Reserved.