IMsDeterministicTransform.SetAttributeExpression

Syntax

SetAttributeExpression: String;

Description

The SetAttributeExpression method sets the expression specified using the factor attributes as the model equation.

The set of attributes must unambiguously determine the factor. Attributes separator and order must match with the order and separator used in the time series database (see IMetaDictionary.AttributeNamings).

Example

Executing the example requires a time series database with the OBJ_RUBRICATOR identifier. The modeling container of this time series database must include the DETERM_MODEL model based on factors and calculated using a determinate equation.

Sub Main;

Var

mb: IMetabase;

ModelCont: IMetabaseObjectDescriptor;

Ruby: IRubricator;

obj: IMetabaseObject;

Transform: IMsFormulaTransform;

Model: IMsModel;

ModelMethod: IMsDeterministicTransform;

Formula: IMsFormula;

Begin

mb := MetabaseClass.Active;

Ruby := mb.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;

ModelCont := ruby.ModelSpace;

Obj := mb.ItemByIdNamespace("DETERM_MODEL", ModelCont.Key).Edit;

Model := Obj As IMsModel;

Transform := Model.Transform;

Formula := Transform.FormulaItem(0);

ModelMethod := Formula.Method As IMsDeterministicTransform;

ModelMethod.SetAttributeExpression(Years|Afghanistan|GGB / 2);

obj.Save;

End Sub Main;

After executing the example a new form, as model equation, is set.

See also:

IMsDeterministicTransform