LevelKey(Element: Integer): Integer;
Element — index of dictionary element.
The Level property returns key of dictionary level containing element with the Element index.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
Elem: IDimElements;
i: Integer;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
Elem:=Dimen.Elements;
i:=Elem.LevelKey(20);
End Sub Main;
After executing the example the "i" variable contains key of dictionary level that houses selected element.
See also: