OpenDimension: IDimInstance;
The OpenDimension property determines an opened cube dimension.
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 UserProc;
Var
Mb: IMetabase;
Cube: IStandardCube;
Dest: IStandardCubeDestination;
DimModel: IDimensionModel;
Dim: IStandardCubeDimension;
ParVals: IMetabaseObjectParamValues;
Begin
Mb := MetabaseClass.Active;
Cube := Mb.ItemById("OBJ_STD_CUBE").Edit As IStandardCube;
Cube.ExternalFactDimension := True;
Dest := Cube.Destinations.Item(0);
DimModel := Mb.ItemById("OBJ_PARAM_DICT").Bind As IDimensionModel;
Dim := Dest.Dimensions.Add(DimModel);
Dim.FactDimension := True;
ParVals := (DimModel As IMetabaseObject).Params.CreateEmptyValues;
ParVals.Item(0).Value := 2;
Dest.FactDimension.OpenDimension := (DimModel As IMetabaseObject).Open(ParVals) As IDimInstance;
(Cube As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the OBJ_PARAM_DICT dictionary is added to the cube as a cube fact dimension. This dimension is opened with the parameter value 2.
See also: