IDimElementGroup.RemovePrimitive

Syntax

RemovePrimitive(Index: Integer): Boolean;

Parameters

Index. Index of the primitive to be deleted.

Description

The RemovePrimitive method removes primitives from the group of dictionary elements.

Example

Executing the example requires that the repository contains a dictionary with the D_TO identifier. A group of elements is created for the dictionary. The group includes several primitives for element selection.

Sub Main;

Var

MB: IMetabase;

MObjDesc: IMetabaseObjectDescriptor;

MObj: IMetabaseObject;

ElemGroup: IDimElementGroup;

Begin

MB:=MetabaseClass.Active;

If MB.ItemById("D_TO").Children.Count<>0 Then

MObjDesc:=MB.ItemById("D_TO");

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

ElemGroup:=MObj As IDimElementGroup;

ElemGroup.RemovePrimitive(ElemGroup.Count-1);

MObj.Save;

End If;

End Sub Main;

Executing the example deletes the last primitive of the first group of dictionary elements.

See also:

IDimElementGroup