Count: Integer;
The Count property returns the number of dictionary element levels.
Sub Main;
Var
MB: IMetabase;
Dimen: IDimInstance;
Levels: IDimLevelsInstance;
i: Integer;
Begin
MB:=MetabaseClass.Active;
Dimen:=MB.ItemById("D_TO").Open(Null) As IDimInstance;
Levels:=Dimen.Levels;
i:=Levels.Count;
End Sub Main;
After executing the example the "i" variable contains the number of dictionary element levels.
See also: