Level(El: Integer): DimCalendarLevel;
El — element index.
The Level method returns dictionary level containing element with the index El.
Sub Main;
Var
MB: IMetabase;
Obj: IMetabaseObjectDescriptor;
CalClass: CalendarDimInstanceFactory;
Dim: IDimInstance;
CalInst: ICalendarDimInstance;
i: Integer;
Begin
Mb:=MetabaseClass.Active;
Obj:=Mb.ItemById("CALENDAR_DIM");
Dim:=Obj.Open(Null) As IDimInstance;
CalClass:=New CalendarDimInstanceFactory.Create;
CalInst:=CalClass.CreateCalendarDimInstance(Dim);
i:=CalInst.Level(Dim.Elements.Count-1);
End Sub Main;
After executing the example the "i" variable contains number of the level containing the last element of the calendar dictionary. Dictionary identifier: CALENDAR_DIM.
See also: