LevelCount: Integer;
The LevelCount property returns the number of levels in calendar dictionary. «6» if zero or 2 hierarchy level is selected, or 5 if the 1 hierarchy type is set. Hierarchy type is determined in the Hierarchy property.
Executing the example assumes that the repository contains a calendar dictionary with the CALENDAR_DIM identifier.
Sub Main;
Var
MB: IMetabase;
CalDim: ICalendarDimension;
i: Integer;
Begin
MB:=MetabaseClass.Active;
CalDim:=MB.ItemById("CALENDAR_DIM").Bind As ICalendarDimension;
i:=CalDim.LevelCount;
End Sub Main;
After executing the example the "i" variable contains the number of levels in calendar dictionary.
See also: