CreateCalendarDimInstance(Cln: IDimInstance): ICalendarDimInstance;
Cln — calendar dictionary data.
The CreateCalendarDimInstance method creates an object containing methods for navigating elements hierarchy in a calendar dictionary.
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.PeriodLength(100);
End Sub Main;
After executing the example the "i" variable contains length of the period containing the 100th element of the calendar dictionary. Dictionary identifier: CALENDAR_DIM.
See also: