ICalculatedCubeExecutor.Selected

Syntax

Selected(Coord: IMatrixCoord): Boolean;

Parameters

Coord - matrix coordinate, for which selection attribute must be determined.

Description

The Selected property determines whether the specified matrix coordinate is selected.

Example

Executing the example requires that the repository contains a calculated cube with the Calc_Cube identifier.

Sub Main;

Var

MB: IMetabase;

Cube: ICalculatedCubeInstance;

Exe: ICalculatedCubeExecutor;

Mat: IMatrix;

Coord: IMatrixCoord;

Ite: IMatrixIterator;

Begin

MB := MetabaseClass.Active;

Cube := Mb.ItemById("Calc_Cube").Open(Null) As ICalculatedCubeInstance;

Exe := Cube.CreateExecutor(Null);

(Exe As ICubeInstanceDestinationExecutor).PrepareExecute(Null);

Mat := Exe.Matrix;

Ite := Mat.CreateIterator;

{Detecting}

Coord := Mat.CreateCoord;

Coord.Item(0) := 0;

Coord.Item(1) := 1;

Exe.Selected(Coord) := True; //Assigning element according to coordinate

{Detecting}

Coord := Mat.CreateCoord;

Coord.Item(0) := 1;

Coord.Item(1) := 1;

Exe.Selected(Coord) := True; //Assigning element according to coordinate

Exe.EvaluateOnly := EvaluateOnlyType.Selected; // calculate only assigned coordinates

Exe.Execute;

Ite.Move(IteratorDirection.First);

While Ite.Valid Do

Debug.Write(Ite.Value);

Ite.Move(IteratorDirection.Next);

End While;

End Sub Main;

After executing the example only selected coordinates will be calculated. The calculated values will be displayed in the console window. Calculated cube identifier - Calc_Cube.

See also:

ICalculatedCubeExecutor