ICubeInstanceDestination.Execute

Syntax

Execute(Selection: IDimSelectionSet; [BasicUnit: Integer = -1]): IMatrix;

Parameters

Selection - cube selection, in accordance to which cube output matrix is calculated.

BasicUnit - measurement units, in accordance to which calculation is executed.

Description

The Execute method calculates the output matrix of a cube.

Example

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

Sub Main;

Var

MB: IMetabase;

Cube: ICubeInstance;

DefDes: ICubeInstanceDestination;

Matr: IMatrix;

Iter: IMatrixIterator;

DimSS: IDimSelectionSet;

DimS: IDimSelection;

Begin

Mb := MetabaseClass.Active;

Cube := Mb.ItemById("Cube_1").Open(Null) As ICubeInstance;

DefDes := Cube.Destinations.DefaultDestination;

DimSS := DefDes.CreateDimSelectionSet;

For Each DimS In DimSS Do

DimS.SelectAll;

End For;

Matr := DefDes.Execute(DimSS);

Iter := Matr.CreateIterator;

Iter.Move(IteratorDirection.First);

While Iter.Valid Do

Debug.Write(Iter.Value + " ");

Iter.Move(IteratorDirection.Next);

End While;

End Sub Main;

After executing the example the cube output matrix is calculated. All calculated values are displayed in the development environment console.

See also:

ICubeInstanceDestination