ValidationExecSelection.CreateFactors

Syntax

CreateFactors(Selection: IDimSelectionSet; Factors: Array);

Parameters

Selection - selection, according to which data must be obtained.

Factors - integer array that includes factor keys, which data must be obtained.

Description

The CreateFactors constructor creates a selection taking into account factors.

Example

Executing the example requires that the repository contains a time series database with the OBJ_RUBRICATOR identifier that includes factors with the 12195999 and 12196000 keys, and calculation of validation with the 1 key.

Sub Main;

Var

MB: IMetabase;

RubInst: IRubricatorInstance;

ValiRun: IValidationExecRun;

ValidSel: IValidationExecSelection;

ValiData: IValidationExecData;

Mat: IMatrix;

It: IMatrixIterator;

Arr: Array[0..1] Of Integer;

Begin

MB := MetabaseClass.Active;

RubInst := MB.ItemById("OBJ_RUBRICATOR").Open(Null) As IRubricatorInstance;

ValiData := RubInst.GetValidationExecData(1, DictionaryGetDataOptions.None);

Arr[0] := 12195999;

Arr[1] := 12196000;

ValidSel := New ValidationExecSelection.CreateFactors(Null, Arr);

ValiRun := RubInst.LoadValidationRun(ValiData, ValidSel);

Mat := ValiRun.Matrix;

It := Mat.CreateIterator;

It.Move(IteratorDirection.First);

While It.Valid Do

Debug.WriteLine(It.Value);

It.Move(IteratorDirection.Next);

End While;

End Sub Main;

After executing the example the console window displays data of validation calculation with the 1 key for specified factors if this data exists.

See also:

ValidationExecSelection