IDimAttributes.Item

Syntax

Item(Index: Variant): IDimAttribute;

Parameters

Index. Attribute index.

Description

The Item property returns an object containing dictionary attribute.

Comments

Attribute index is passed in the Index parameter.

Example

Executing the example requires that the repository contains a table dictionary with the D_TO identifier.

Add links to the Dimensions, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    DimModel: IDimensionModel;
    Index: IDimIndex;
    IndAtr: IDimIndexAttributes;
    Atr: IDimAttribute;
    S: String;
Begin
    
// Get current repository
    MB := MetabaseClass.Active;
    
// Get dictionary
    DimModel := MB.ItemById("D_TO").Bind As IDimensionModel;
    
// Get the first dictionary index
    Index := DimModel.Indexes.Item(0);
    
If Index <> Null Then
        
// Get attributes of the first dictionary index
        IndAtr := Index.Attributes;
        
// Get the first attribute
        Atr := IndAtr.Item(0);
        S := Atr.Name;
        Debug.WriteLine(
"Name of the first index attribute: " + S);
    
Elseif Index = Null Then
        Debug.WriteLine(
"Index is not found");
    
End If;
End Sub UserProc;

After executing the example the "S" variable contains name of the first attribute for the first dictionary index.

See also:

IDimAttributes