LevelKey: Integer;
The LevelKey property returns key of dictionary level.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
Levels: IDimLevelsInstance;
Level: IDimLevelInstance;
i: Integer;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
Levels:=Dimen.Levels;
Level:=Levels.Item(Levels.Count-1);
i:=Level.LevelKey;
End Sub Main;
After executing the example the "s" variable shows key of the last dictionary level.
See also: