Add(Dimension: IDimensionModel): IAutoCubeDimension;
Dimension. Structure of the dictionary, based on which a dimension in automatic cube will be created.
The Add method adds a dictionary to the automatic cube dimensions collection.
IMPORTANT. After new dictionaries are added, the present data in the automatic cube is lost.
Executing the example requires that the repository contains an automatic cube with the AUTO_CUBE identifier and a dictionary with the Dim_1 identifier.
Sub UserProc;
Var
MB: IMetabase;
AutoCube: IAutoCube;
Dims: IAutoCubeDimensions;
Dim: IDimensionModel;
Begin
MB := MetabaseClass.Active;
AutoCube := MB.ItemById("AUTO_CUBE").Edit As IAutoCube;
Dim := MB.ItemById("Dim_1").Bind As IDimensionModel;
Dims := AutoCube.Dimensions;
Dims.Add(Dim);
(AutoCube As IMetabaseObject).Save;
End Sub UserProc;
After executing the example a dimension based on the specified repository dictionary is added to the collection of automatic cube dimensions.
See also: