ICustomDimLevels.Add

Syntax

Add: ICustomDimLevel;

Description

The Add method adds a new level.

Comments

After level adding, the method returns its parameters.

Example

Executing the example requires a standard cube with the CUBE_1 identifier.

Sub Main;

Var

MB: IMetabase;

MObj: IMetabaseObject;

Cube: IStandardCube;

CustDim: ICustomDimension;

CustLevs: ICustomDimLevels;

CustLevel: ICustomDimLevel;

Begin

MB := MetabaseClass.Active;

MObj := MB.ItemById("CUBE_1").Edit;

Cube := MObj As IStandardCube;

CustDim := Cube.FactDimension.Dimension As ICustomDimension;

CustLevs := CustDim.Levels;

CustLevel := CustLevs.Add;

CustLevel.Id := "New_level";

CustLevel.Name := "New_level";

MObj.Save;

End Sub Main;

After executing the example a new level is created in fact dimension of the cube. Cube identifier: CUBE_1.

See also:

ICustomDimLevels