Add(Dimension: IDimensionModel): IAutoCubeDimension;
Dimension - structure of the dictionary that must be added to the collection of automatic cube dimensions.
The Add method adds a dictionary to the automatic cube dimensions collection.
NOTE. 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 AUTO_CUBE identifier and a dictionary with the Dim_1 identifier.
Sub Main;
Var
MB: IMetabase;
MObj: IMetabaseObject;
AutoCub: IAutoCube;
Dims: IAutoCubeDimensions;
Dim: IDimensionModel;
Begin
MB := MetabaseClass.Active;
MObj := MB.ItemById("AUTO_CUBE").Edit;
AutoCub := MObj As IAutoCube;
Dim := MB.ItemById("Dim_1").Bind As IDimensionModel;
Dims := AutoCub.Dimensions;
Dims.Add(Dim);
MObj.Save;
End Sub Main;
After executing the example the repository dictionary with the Dim_1 identifier is added to the collection of automatic cube dimensions.
See also: