IDynamicInstance.AttributeCount

Syntax

AttributeCount: Integer;

Description

The AttributeCount property returns number of dictionary attributes.

Example

Executing the example requires that the repository contains MDM table dictionary with set dynamic loading of elements and with the DYNDIM identifier.

Add links to the Dimensions and Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    Dim: IDynamicInstance;
    DimInst: IDimInstance;
    DimElementArr: IDimElementArray;
Begin
    MB := MetabaseClass.Active;
    Dim := MB.ItemById("DYNDIM").Open(NullAs IDynamicInstance;
    // Display dictionary name
    DimInst := Dim.DimInstance;
    Debug.WriteLine("Dictionary name: " + DimInst.Name);
    // Get array of all dictionary elements
    DimElementArr := Dim.CreateDimElementArray;
    // Display number of elements in dictionary
    Debug.WriteLine("Elements in dictionary: " + DimElementArr.Count.ToString);
    // Display number of dictionary attributes
    Debug.WriteLine("Number of attributes: " + Dim.AttributeCount.ToString);
End Sub UserProc;

After executing the example the console displays dictionary name, number of elements and number of attributes.

See also:

IDynamicInstance