Decompose;
The Decompose method decomposes composite selection to dimensions.
Executing the example requires that the repository contains a virtual cube with the CUBE_VIRTUAL identifier.
Sub Main;
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(Null) As ICompoundDimensionInstance;
Sel := Cinstance.Selection.Item(0) As ICompoundSelection;
If Not Sel.IsSingleSelected Then
Sel.Decompose;
End If;
Obj.Save;
End Sub Main;
After executing the example composite selection is decomposed to dimension if dimensions are included into the selection.
See also: