IMsAttributesFormulasList.Count

Syntax

Count: Integer;

Description

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

Comments

Collection capacity is the number of elements that can be contained in the collection. 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.

Add links to the Cubes, Metabase, Ms 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.Execute);
    End For;
End Sub UserProc;

After executing the example the console window displays formulas for calculation of additional model attributes.

See also:

IMsAttributesFormulasList