CreateExecutor(Selection: IDimSelectionSet): ICalculatedCubeExecutor;
Selection. Calculated cube selection, according to which cube matrix will be built.
The CreateExecutor method creates an object that calculates the output matrix of a calculated cube.
If Null is sent as a value of the Selection parameter, a matrix is built by all cube dimension elements.
Executing the example requires that the repository contains a calculated cube with the Calc_Cube identifier.
Sub UserProc;
Var
MB: IMetabase;
CubeInst: ICalculatedCubeInstance;
Exec: ICalculatedCubeExecutor;
Matr: IMatrix;
Iter: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
CubeInst := Mb.ItemById("Calc_Cube").Open(Null) As ICalculatedCubeInstance;
Exec := CubeInst.CreateExecutor(Null);
(Exec As ICubeInstanceDestinationExecutor).PrepareExecute(Null);
Exec.Execute;
Matr := Exec.Matrix;
Iter := Matr.CreateIterator;
Iter.Move(IteratorDirection.First);
While Iter.Valid Do
Debug.WriteLine(Iter.Value);
Iter.Move(IteratorDirection.Next);
End While;
End Sub UserProc;
After executing the example the output matrix of calculated cube is calculated. All matrix values are displayed in the console window.
See also: