IDynamicInstance.CreateAttributes

Syntax

CreateAttributes: IDimAttributes;

Description

The CreateAttributes method returns collection 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;
    Attributes: IDimAttributes;
    AttrsInst: IDimAttributesInstance;
Begin
    MB := MetabaseClass.Active;
    Dim := MB.ItemById("DYNDIM").Open(NullAs IDynamicInstance;
    // Get collection of dictionary attributes
    Attributes := Dim.CreateAttributes;
    // Get collection of dictionary attributes instances
    AttrsInst := Dim.CreateAttributesInstance;
    // Display attribute name and first element attribute value
    Debug.WriteLine("Attribute name: " + Attributes.Item(0).Name +
        "; First element attribute value: " + AttrsInst.Item(0).Value(0));
End Sub UserProc;

After executing the example the console displays attribute name and value of this attribute for the first element.

See also:

IDynamicInstance