IAutoCubeDimensions.Add

Syntax

Add(Dimension: IDimensionModel): IAutoCubeDimension;

Parameters

Dimension - structure of the dictionary that must be added to the collection of automatic cube dimensions.

Description

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.

Example

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:

IAutoCubeDimensions