ICubeSelectionControlItem.ControllingDim

Syntax

ControllingDim: IDimensionModel;

Description

The ControllingDim property returns the controlling cube dimension.

Example

Executing the example requires that the repository contains a standard cube with the CUBE_OBJ identifier, which contains a parametric dictionary and a dictionary with the UNITS identifier as a dimension in cube dimensions.

To execute the example, add links to the Metabase, Cubes and Dimensions system assemblies.

Sub Main;
Var
    Mb: IMetabase;
    Cube: ICubeModel;
    ControllingDim: IDimensionModel;
    selItem: ICubeSelectionControlItem;
Begin
    Mb := MetabaseClass.Active;
    Cube := Mb.ItemById("CUBE_OBJ").Edit As ICubeModel;
    ControllingDim := Cube.Destinations.DefaultDestination.Dimensions.FindById("UNITS");
    selItem := Cube.SelectionControl.Item(0);
    selItem.ControllingDim := ControllingDim;
    selItem.Expression.AsString := "FIRST.Key";
    selItem.SelectionStrategy := CubeSelectionControlStrategy.SelectFirst;
    (Cube As IMetabaseObject).Save;
End Sub Main;

After executing the example the following will be determined for the first controlled dimension: a controlling dimension - a dictionary with the UNITS identifier, the FIRST.Key control expression and the Select the First Element control strategy.

See also:

ICubeSelectionControlItem