IMetaMember.DecCountTotal

Syntax

DecCountTotal(Decrement: Integer; Recursive: Boolean;[ PrevLevelIndex: Integer = -1]);

Parameters

Decrement - number of decreased elements.

Recursive - parameter that determines whether elements on all lower levels of a current element are excluded from hierarchy. True - elements on lower levels are excluded; False - child elements are not excluded from hierarchy.

PrevLevelIndex - index of a previous level. Optional parameter. Default value is -1.

Description

The DecCountTotal method decreases hierarchy by a specified number of elements.

Example

Executing the example requires a form with a button with the Button1 identifier, the MetaAttributesBreadcrumb component, and the MetaAttributesTreeList component named MetaAttributesTreeList1. Current components are set up to work with any time series database.

Click the button to start executing the example.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

SelNodes: Array;

MembersSet: IMetaMembersSet;

Member: IMetaMember;

Begin

SelNodes := MetaAttributesTreeList1.GetSelectedNodes;

MembersSet := MetaAttributesTreeList1.GetNodesMembers(SelNodes);

MembersSet.Reset;

While Not MembersSet.Eof Do

Member := MembersSet.Current;

Member.DecCountTotal(1, True);

MembersSet.Next;

End While;

End Sub Button1OnClick;

After executing the example hierarchy is decreased by a selected number of elements.

See also:

IMetaMember