Execute(Selection: IDimSelectionSet; [BasicUnit: Integer = -1]): IMatrix;
Selection. Cube selection, in accordance to which cube output matrix is calculated.
BasicUnit. Measurement units, according to which calculation is executed.
The Execute method calculates output cube matrix.
Executing the example requires that the repository contains a cube with the CUBE_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
CubeInst: ICubeInstance;
DefDes: ICubeInstanceDestination;
Matr: IMatrix;
Iter: IMatrixIterator;
DimSS: IDimSelectionSet;
DimS: IDimSelection;
Begin
Mb := MetabaseClass.Active;
// Open cube
CubeInst := Mb.ItemById("CUBE_1").Open(Null) As ICubeInstance;
DefDes := CubeInst.Destinations.DefaultDestination;
// Create selection
DimSS := DefDes.CreateDimSelectionSet;
For Each DimS In DimSS Do
DimS.SelectAll;
End For;
// Matrix calculation
Matr := DefDes.Execute(DimSS);
// Create iterator and view calculated values
Iter := Matr.CreateIterator;
Iter.Move(IteratorDirection.First);
While Iter.Valid Do
Debug.Write(Iter.Value + " ");
Iter.Move(IteratorDirection.Next);
End While;
End Sub UserProc;
After executing the example the cube output matrix is calculated. All calculated values are displayed in the development environment console.
See also: