ValidationExecSelection.CreateFactors

Syntax

CreateFactors(Selection: IDimSelectionSet; Factors: Array);

Parameters

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

Factors. Integer array that includes indicator keys, which data must be obtained.

Description

The CreateFactors constructor creates a selection taking into account indicators.

Example

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

Sub UserProc;
Var
    MB: IMetabase;
    RubInst: IRubricatorInstance;
    ValiRun: IValidationExecRun;
    ValidSel: IValidationExecSelection;
    ValiData: IValidationExecData;
    Matr: IMatrix;
    It: IMatrixIterator;
    Arr: Array[0..1Of Integer;
Begin
    MB := MetabaseClass.Active;
    RubInst := MB.ItemById("OBJ_RUBRICATOR").Open(NullAs IRubricatorInstance;
    ValiData := RubInst.GetValidationExecData(1, DictionaryGetDataOptions.None);
    Arr[0] := 12195999;
    Arr[1] := 12196000;
    ValidSel := New ValidationExecSelection.CreateFactors(Null, Arr);
    ValiRun := RubInst.LoadValidationRun(ValiData, ValidSel);
    Matr := ValiRun.Matrix;
    It := Matr.CreateIterator;
    It.Move(IteratorDirection.First);
    While It.Valid Do
        Debug.WriteLine(It.Value);
        It.Move(IteratorDirection.Next);
    End While;
End Sub UserProc;

After executing the example the development environment console displays data of validation calculation with the 1 key for the specified indicators if this data exists.

See also:

ValidationExecSelection