AggregationOperands: IMsFormulaTermList;
The AggregationOperands property returns a collection of terms used to compile the expression of aggregation.
Executing the example requires a model with the key 123456 in the repository. Method of model calculation is aggregation (basic) that is calculated as determinate equation.
Add links to the Metabase, Ms system assemblies.
Sub UserProc;
Var
mb: IMetabase;
obj: IMetabaseObject;
Model: IMsModel;
Transform: IMsFormulaTransform;
Formula: IMsFormula;
DetermAggregation: IMsDetermAggregationTransform;
i: Integer;
Operands: IMsFormulaTermList;
Begin
mb := MetabaseClass.Active;
Obj := Mb.Item(123456).Edit;
Model := Obj As IMsModel;
Transform := Model.Transform;
Formula := Transform.FormulaItem(0);
Formula.Kind := MsFormulaKind.DetermAggregation;
DetermAggregation := Formula.Method As IMsDetermAggregationTransform;
Operands := DetermAggregation.AggregationOperands;
Debug.WriteLine("Expression terms of aggregations:");
For i := 0 To Operands.Count - 1 Do
Debug.WriteLine(" - " + Operands.Item(i).TermToText);
End For;
Operands := DetermAggregation.CompositionRelevanceOperands;
Debug.WriteLine("Expression terms of calculation of threshold of aggregation:");
For i := 0 To Operands.Count - 1 Do
Debug.WriteLine(" - " + Operands.Item(i).TermToText);
End For;
Operands := DetermAggregation.WeightsOperands;
Debug.WriteLine("Expression terms for assigning of weights of aggregation:");
For i := 0 To Operands.Count - 1 Do
Debug.WriteLine(" - " + Operands.Item(i).TermToText);
End For;
End Sub UserProc;
After executing the example, terms of aggregation expression, terms of aggregation threshold calculation expression and terms of expression for setting aggregation balance are displayed in the console window.
See also: