IAutoCubeTransform.Execute

Syntax

Execute;

Description

The Execute method transforms data that is required to change position of cube dimensions position.

Example

Executing the example requires that the repository contains an automatic cube with AUTO_CUBE identifier. There are more than one dimension in the cube.

Sub Main;
Var
    MB: IMetabase;
    AutoCub: IAutoCube;
    Dims: IAutoCubeDimensions;
    Dim: IAutoCubeDimension;
    Transf: IAutoCubeTransform;
    b: Boolean;
Begin
    MB := MetabaseClass.Active;
    AutoCub := MB.ItemById(
"AUTO_CUBE").Edit As IAutoCube;
    Dims := AutoCub.Dimensions;
    Dims.Move(
01);
    Transf := AutoCub.Transform;
    Debug.WriteLine(
"Initial list of dimensions");
    
For Each Dim In Transf.MapDimensions Do
        Debug.WriteLine((Dim.Dimension 
As IMetabaseObject).Name)
    
End For;
    Debug.WriteLine(
"List of dimensions after rearrangement");
    
For Each Dim In Transf.Dimensions Do
        Debug.WriteLine((Dim.Dimension 
As IMetabaseObject).Name)
    
End For;
    
If Transf.GetChanged(b) Then
        Transf.Execute;
    
End If;
    (AutoCub 
As IMetabaseObject).Save;
End Sub Main;

After executing the example the first two dimensions are rearranged in the dimensions list of automatic cube. If data dimensions with have been changed, cube data is appropriately transformed. The console window displays lists of dimensions names before and after transposition.

See also:

IAutoCubeTransform