CreateExecutor(Selection: IDimSelectionSet): ICalculatedCubeExecutor;
Selection - calculated cube selection, according to which a cube matrix is created. If Null is passed, the matrix is built by all elements of cube dimensions.
The CreateExecutor method creates an object that calculates the output matrix of a calculated cube.
Executing the example requires a calculated cube with the Calc_Cube identifier.
Sub Main;
Var
MB: IMetabase;
Cube: ICalculatedCubeInstance;
Exe: ICalculatedCubeExecutor;
Mat: IMatrix;
Ite: IMatrixIterator;
Begin
MB := MetabaseClass.Active;
Cube := Mb.ItemById("Calc_Cube").Open(Null) As ICalculatedCubeInstance;
Exe := Cube.CreateExecutor(Null);
(Exe As ICubeInstanceDestinationExecutor).PrepareExecute(Null);
Exe.Execute;
Mat := Exe.Matrix;
Ite := Mat.CreateIterator;
Ite.Move(IteratorDirection.First);
While Ite.Valid Do
Debug.WriteLine(Ite.Value);
Ite.Move(IteratorDirection.Next);
End While;
End Sub Main;
After executing the example the output matrix of the calculated cube with the Calc_Cube identifier is calculated. All matrix values are displayed in the console window.
See also: