IStandardCubeDimension.OpenDimension

Syntax

OpenDimension: IDimInstance;

Description

The OpenDimension property determines an opened cube dimension.

Example

Executing the example requires that the repository contains a standard cube with the OBJ_STD_CUBE identifier and a parametric dictionary with the OBJ_PARAM_DICT identifier. The first parameter in the dictionary must be integer.

Sub Main;

Var

mb: IMetabase;

Obj: IMetabaseObject;

Cub: IStandardCube;

ParamDict: IMetabaseObject;

Di: IDimInstance;

ParVals: IMetabaseObjectParamValues;

DimModel: IDimensionModel;

Dim: IStandardCubeDimension;

Begin

mb := MetabaseClass.Active;

Obj := mb.ItemById("OBJ_STD_CUBE").Edit;

Cub := Obj As IStandardCube;

Cub.ExternalFactDimension := True;

ParamDict := mb.ItemById("OBJ_PARAM_DICT").Bind;

DimModel := ParamDict As IDimensionModel;

Dim := Cub.Dimensions.Add(DimModel);

Dim.FactDimension := True;

ParVals := ParamDict.Params.CreateEmptyValues;

ParVals.Item(0).Value := 2;

Di := ParamDict.Open(ParVals) As IDimInstance;

Cub.FactDimension.OpenDimension := Di;

Obj.Save;

End Sub Main;

After executing the example the OBJ_PARAM_DICT dictionary is added to the cube as a cube facts dimension. This dimension is opened with the parameter value 2.

See also:

IStandardCubeDimension