AttributeValue(Element: Integer; AttributeIndex: Integer): Variant;
Element - element index.
AttributeIndex - index of the attribute for which the value is obtained.
The AttributeValue property returns value of element attribute. Element index and attribute index are passed by the Element and AttributeIndex parameters respectively.
Executing the example requires that the repository contains a dictionary with the D_TO identifier.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
Elem: IDimElements;
v: Variant;
Begin
MB := MetabaseClass.Active;
Dimen := MB.ItemById("D_TO").Open(Null) As IDimInstance;
Elem := Dimen.Elements;
v := Elem.AttributeValue(0, Dimen.Dimension.Attributes.Count - 1);
End Sub Main;
After executing the example the "v" variable contains value of the last attribute for the first dictionary element.
See also: