ICompoundSelection.Decompose

Syntax

Decompose;

Description

The Decompose method decomposes composite selection to dimensions.

Example

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

Sub UserProc;
Var
    Mb: IMetabase;
    Obj: IMetabaseObject;
    Cub: IVirtualCube;
    Dimension: ICompoundDimension;
    Cinstance: ICompoundDimensionInstance;
    Sel: ICompoundSelection;
Begin
    Mb := MetabaseClass.Active;
    Obj := Mb.ItemById("CUBE_VIRTUAL").Edit;
    Cub := Obj As IVirtualCube;
    Dimension := Cub.FactDimension As ICompoundDimension;
    Cinstance := (Dimension As IMetabaseObject).Open(NullAs ICompoundDimensionInstance;
    Sel := Cinstance.Selection.Item(0As ICompoundSelection;
    If Not Sel.IsSingleSelected Then
        Sel.Decompose;
    End If;
    Obj.Save;
End Sub UserProc;

After executing the example composite selection is decomposed to dimension if dimensions are included into the selection.

See also:

ICompoundSelection