ICalendarDimInstanceFactory.CreateCalendarDimInstance

Syntax

CreateCalendarDimInstance(Cln: IDimInstance): ICalendarDimInstance;

Parameters

Cln — calendar dictionary data.

Description

The CreateCalendarDimInstance method creates an object containing methods for navigating elements hierarchy in a calendar dictionary.

Example

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:

ICalendarDimInstanceFactory