ICustomDimElements.AttributeValue

Syntax

AttributeValue(Row: Integer; AttributeIndex: Integer): Variant;

Parameters

Row. Index of the row containing the necessary element.

AttributeIndex. Index of the attribute which value is to be determined.

Description

The AttributeValue property determines the specified attribute value for selected dictionary element.

Comments

Basic attributes are generated in designed dictionary, which is created on generating local dimension of facts, as follows:

Index Attribute
0 Key
1 Name
2 Order

If designed dictionary is created on saving alternative hierarchy of analytical data area, the attribute list and order will differ and will depend on the dimension for which the alternative hierarchy was saved. Index of necessary attribute can be calculated on parsing the ICustomDimension.Attributes attribute collection.

Example

Executing the example requires a standard cube with the CUBE_1 identifier.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Cube: IStandardCube;

CustDim: ICustomDimension;

Elems: ICustomDimElements;

i: Integer;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("CUBE_1").Edit;

Cube := MObj As IStandardCube;

CustDim := Cube.FactDimension.Dimension As ICustomDimension;

Elems := CustDim.Elements;

For i := 0 To Elems.RowCount - 1 Do

Elems.AttributeValue(i, 1) := "Element " + i.ToString;

End For;

MObj.Save;

End Sub Main;

After executing the example names of all fact dimension elements are changed.

See also:

ICustomDimElements