Matrix: IMatrix;
The Matrix method returns 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 only assigned coordinates will be calculated. The calculated values will be displayed in the console window. Calculated cube identifier - Calc_Cube.
See also: