ICalculatedCubeExecutor.Select_

Syntax

Select_(Coord: IMatrixCoord; [Value: Boolean = True);

Parameters

Coord. Coordinate in the matrix that must be selected for the following values calculating according to it.

Value. Value that determines status of coordinate selection. True - coordinate is selected, False - coordinate is not selected.

Description

The Select_ method selects the specified coordinate in a matrix to calculate values by this coordinate.

Example

Executing the example requires a calculated cube with the Calc_Cube identifier. The cube contains two dimensions.

Sub UserProc;
Var
    MB: IMetabase;
    Cube: ICalculatedCubeInstance;
    Exe: ICalculatedCubeExecutor;
    Mat: IMatrix;
    Coord: IMatrixCoord;
    Ite: IMatrixIterator;
Begin
    MB := MetabaseClass.Active;
    Cube := Mb.ItemById("Calc_Cube").Open(NullAs ICalculatedCubeInstance;
    Exe := Cube.CreateExecutor(Null);
    (Exe As ICubeInstanceDestinationExecutor).PrepareExecute(Null);
    Mat := Exe.Matrix;
    Ite := Mat.CreateIterator;
    //Determine coordinate
    Coord := Mat.CreateCoord;
    Coord.Item(0) := 0;
    Coord.Item(1) := 1;
    Exe.Select_(Coord); //Determine element according to coordinate
    //Determine coordinate
    Coord := Mat.CreateCoord;
    Coord.Item(0) := 1;
    Coord.Item(1) := 1;
    Exe.Select_(Coord); //Determine element according to coordinate
    Exe.EvaluateOnly := EvaluateOnlyType.Selected; //Calculate only selected coordinates
    Exe.Execute;
    Ite.Move(IteratorDirection.First);
    While Ite.Valid Do
        Debug.WriteLine(Ite.Value);
        Ite.Move(IteratorDirection.Next);
    End While;
End Sub UserProc;

After executing the example only selected coordinates will be calculated. The calculated values will be displayed in the console window.

See also:

ICalculatedCubeExecutor