IRdsDictionaryElement.Move

Syntax

Move(InPlaceDictionaryElement: IRdsDictionaryElement);

Parameters

InPlaceElement. Element, to the place of which a current element is placed.

Description

The Move method moves a current element with an element passed by the InPlaceDictionaryElement parameter. Element move is available within one parent element.

Example

Executing the example requires the MDM repository NSI_1 that contains an MDM dictionary with the Dict_1 identifier.

Sub Main;

Var

MB: IMetabase;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

Elements: IRdsDictionaryElements;

Element: IRdsDictionaryElement;

List: IRdsDictionaryElementList;

Begin

MB := MetabaseClass.Active;

Dict := MB.ItemByIdNamespace("Dict_1", MB.ItemById("NSI_1").Key).Bind As IRdsDictionary;

DictInst := Dict.Open(Null);

Elements := DictInst.Elements;

List := Elements.RootItem.Children;

Element := List.Item(0);

Element.Move(List.Item(List.Count - 1));

End Sub Main;

After executing the example the first and the last root elements of the MDM dictionary exchange their positions.

See also:

IRdsDictionaryElement