IMsAttributesFormulasList.Count

Syntax

Count: Integer;

Description

The property is read-only.

The Count property returns the number of calculation methods in the collection.

 

Comments

Collection capacity is the number of elements the collection can contain. The Count property is the number of elements, which is actually contained in the collection.

The capacity is always greater or equal to the value of the Count property. If value of the Count property is greater than the capacity when an element is added to the collection, the capacity is automatically increased.

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier. The database modeling container includes a model with the MODEL identifier that contains methods that are used to calculate additional attributes. Also, before executing the procedure add links to the Ms, Cubes, Metabase system assemblies.

Sub UserProc;

Var

Mb: IMetabase;

Rubr: IRubricator;

Model: IMsModel;

FormulasList: IMsAttributesFormulasList;

AttrTranfsorm: IMsFormulaTransform;

i: Integer;

StrGen: IMsTransformStringGenerator;

Begin

Mb := MetabaseClass.Active;

Rubr := Mb.ItemById("OBJ_RUBRICATOR").Bind As IRubricator;

Model := Mb.ItemByIdNamespace("MODEL", Rubr.ModelSpace.Key).Bind As IMsModel;

FormulasList := Model.AttributeFormulasList;

For i := 0 To FormulasList.Count - 1 Do

AttrTranfsorm := FormulasList.Item(0);

StrGen := AttrTranfsorm.CreateStringGenerator;

Debug.WriteLine(Attribute calculation formula: + StrGen.Exeslicee);

End For;

End Sub UserProc;

After executing the example the calculated formulas of additional model attributes are displayed in the console window.

See also:

IMsAttributesFormulasList