IDimLevelsGroupPrimitive.DeleteLevel

Syntax

DeleteLevel(Value: IDimLevel);

Parameters

Value — dictionary level elements of which should be included.

Description

The DeleteLevel method deletes dictionary level from element group's primitive.

Example

Executing the example requires that the repository contains a dictionary with the TAB_DIM identifier. A group of elements is created for the dictionary. The first primitive of the element group includes elements of certain dictionary level into selection.

Sub Main;

Var

MB: IMetabase;

ObjDesc: IMetabaseObjectDescriptor;

MObj: IMetabaseObject;

ElemGroup: IDimElementGroup;

LevelPrim: IDimLevelsGroupPrimitive;

Level: IDimLevel;

Begin

MB := MetabaseClass.Active;

ObjDesc := MB.ItemById("TAB_DIM");

MObj := ObjDesc.Children.Item(0).Edit;

ElemGroup := MObj As IDimElementGroup;

LevelPrim := ElemGroup.Item(0) As IDimLevelsGroupPrimitive;

Level := ElemGroup.Dimension.Levels.Item(0);

If LevelPrim.IsLevelIncluded(Level) Then

LevelPrim.DeleteLevel(Level);

End If;

MObj.Save;

End Sub Main;

After executing the example selection of the first dictionary level is removed from the primitive including level elements, if this selection was enabled.

See also:

IDimLevelsGroupPrimitive