IAutoCubeTransform.GetChanged

Syntax

GetChanged(Var OnlyPositions: Boolean): Boolean;

Parameters

OnlyPositions. The parameter determines whether positions of automatic cube dimensions are changed.

Description

The GetChanged method returns True if there are positions of automatic cube dimensions have been changed.

NOTE. Position of the calendar dimension in the list does not influence general structure. The method returns False during shift of calendar dimension.

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;

MObj: IMetabaseObject;

AutoCub: IAutoCube;

Dims: IAutoCubeDimensions;

Dim: IAutoCubeDimension;

Transf: IAutoCubeTransform;

b: Boolean;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("AUTO_CUBE").Edit;

AutoCub := MObj As IAutoCube;

Dims := AutoCub.Dimensions;

Dims.Move(0, 1);

Transf := AutoCub.Transform;

Debug.WriteLine("Initial dimensions list");

For Each Dim In Transf.MapDimensions Do

Debug.WriteLine((Dim.Dimension As IMetabaseObject).Name)

End For;

Debug.WriteLine("Dimensions list 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;

MObj.Save;

End Sub Main;

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

See also:

IAutoCubeTransform