AGI STK VGT 11 Send 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





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
Member Value Description
eCrdnCalcScalarTypeUnknown -1 Unknown or unsupported calculation scalar types
eCrdnCalcScalarTypeAngle 0 Scalar equal to angular displacement obtained from any angle in VGT.
eCrdnCalcScalarTypeFixedAtTimeInstant 1 Constant scalar created by evaluating input scalar calculation at specified reference time instant.
eCrdnCalcScalarTypeConstant 2 Constant scalar value of specified dimension.
eCrdnCalcScalarTypeDataElement 3 Any time-dependent data element from STK data providers available for parent STK object.
eCrdnCalcScalarTypeDerivative 4 Derivative of input scalar calculation.
eCrdnCalcScalarTypeElapsedTime 5 Time elapsed since reference time instant.
eCrdnCalcScalarTypeFile 6 Tabulated scalar calculation data loaded from specified file.
eCrdnCalcScalarTypeFunction 7 Defined by performing one of specified functions on input scalar.
eCrdnCalcScalarTypeIntegral 8 Integral of input scalar computed with respect to time using one of specified numerical methods and using one of specified accumulation types.
eCrdnCalcScalarTypeFunction2Var 9 Defined by performing one of specified binary operations on two scalar arguments.
eCrdnCalcScalarTypeVectorMagnitude 10 Scalar equal to magnitude of specified vector.
eCrdnCalcScalarTypePlugin 11 A calc scalar plugin based on a COM object.
eCrdnCalcScalarTypeCustomScript 12 A calc scalar uses scripted algorithm in MATLAB (.m or .dll), Perl or VBScript to define its value and rate.

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

© 2016 All Rights Reserved.

STK Programming Interface 11.0.1