IDimLevelsGroupPrimitive.IsLevelIncluded

Syntax

IsLevelIncluded(Level: IDimLevel): Boolean;

Parameters

Level — dictionary level to be checked.

Description

The IsLevelIncluded method checks if dictionary level passed by the Level parameter, is selected in primitive in the list of levels elements of which should be included.

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