IRubricatorFactorIO.CalendarSubstituteKey

Fore Syntax

CalendarSubstituteKey: Integer;

Fore.NET Syntax

CalendarSubstituteKey: uinteger;

Description

The CalendarSubstituteKey property determines a key of calendar dictionary used for data extraction and storage.

Comments

If CalendarSubstituteKey = -1, calendar dictionary, used by object, is used to extract and store data.

Fore Example

Executing the example requires that the repository contains a time series database with the FC_COMM identifier and a calendar dictionary with the CALENDARSETUP identifier. Add links to the Metabase, Dimensions, Cubes and Matrix system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Inst: IRubricatorInstance;
    Cub: ICubeInstance;
    Dest: ICubeInstanceDestination;
    Exe: ICubeInstanceDestinationExecutor;
    Mat: IMatrix;
    FactorIO: IRubricatorFactorIO;
    CalendarObj: IMetabaseObjectDescriptor;
Begin
    mb := MetabaseClass.Active;
    Inst := mb.ItemById("FC_COMM").Open(NullAs IRubricatorInstance;
    Cub := Inst As ICubeInstance;
    Dest := Cub.Destinations.DefaultDestination;
    Exe := Dest.CreateExecutor;
    FactorIO := Exe As IRubricatorFactorIO;
    CalendarObj := mb.ItemById("CALENDARSETUP");
    FactorIO.CalendarSubstituteKey := CalendarObj.Key;
    Exe.PrepareExecute(Null);
    Exe.PerformExecute;
    Mat := Exe.Matrix;
End Sub UserProc;

After executing the example the Mat variable holds a matrix that contains data of the time series database with the FC_COMM identifier. Database data is retrieved according to parameters of the CALENDARSETUP calendar.

Fore.NET Example

Executing the example requires that the repository contains a time series database with the FC_COMM identifier and a calendar dictionary with the CALENDARSETUP identifier.

Imports Prognoz.Platform.Interop.Dimensions;
Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Matrix;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    Inst: IRubricatorInstance;
    Cub: ICubeInstance;
    Dest: ICubeInstanceDestination;
    Exe: ICubeInstanceDestinationExecutor;
    Mat: IMatrix;
    FactorIO: IRubricatorFactorIO;
    CalendarObj: IMetabaseObjectDescriptor;
Begin
    mb := Params.Metabase;
    Inst := mb.ItemById["FC_COMM_26"].Open(NullAs IRubricatorInstance;
    Cub := Inst As ICubeInstance;
    Dest := Cub.Destinations.DefaultDestination;
    Exe := Dest.CreateExecutor();
    FactorIO := Exe As IRubricatorFactorIO;
    CalendarObj := mb.ItemById["CALENDARSETUP"];
    FactorIO.CalendarSubstituteKey := CalendarObj.Key;
    Exe.PrepareExecute(Null);
    Exe.PerformExecute(False);
    Mat := Exe.Matrix;
End Sub;

After executing the example the Mat variable holds a matrix that contains data of the time series database with the FC_COMM identifier. Database data is retrieved according to parameters of the CALENDARSETUP calendar.

See also:

IRubricatorFactorIO