IDimLevelsGroupPrimitive.AddLevel

Syntax

AddLevel(Value: IDimLevel);

Parameters

Value — dictionary level elements of which should be included.

Description

The AddLevel method adds to primitive a dictionary level, elements of which should be included. The level is passed by the Value parameter.

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.

Sub UserProc;
Var
    MB: IMetabase;
    ObjDesc: IMetabaseObjectDescriptor;
    Child: IMetabaseObjectDescriptors;
    MObj: IMetabaseObject;
    ElemGroup: IDimElementGroup;
    ElemGroupPrim: IDimElementGroupPrimitive;
Begin
    MB := MetabaseClass.Active;
    ObjDesc := MB.ItemById("TAB_DIM");
    Child := ObjDesc.Children;
    MObj := Child.Item(0).Edit;
    ElemGroup := MObj As IDimElementGroup;
    ElemGroupPrim := ElemGroup.AddPrimitive(SelectionGroupType.Levels);
    (ElemGroupPrim As IDimLevelsGroupPrimitive).AddLevel(ElemGroup.Dimension.Levels.Item(0));
    MObj.Save;
End Sub UserProc;

After executing the example the primitive that includes elements of the first dictionary level is added to the first group of dictionary elements.

See also:

IDimLevelsGroupPrimitive