IRdsDictionaryElement.InsertChildCopy

Syntax

InsertChildCopy(Source: IRdsDictionaryElement): IRdsDictionaryElement;

Parameters

Source. Element, which data is copied.

Description

The InsertChildCopy method creates a new child element for this element. A new element is created on the base of data of an element passed by the Source parameter and added to the end of the whole branch of child elements.

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;

Attrs: IRdsAttributes;

Dict: IRdsDictionary;

DictInst: IRdsDictionaryInstance;

Elements: IRdsDictionaryElements;

Element: IRdsDictionaryElement;

Begin

MB := MetabaseClass.Active;

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

Attrs := Dict.Attributes;

DictInst := Dict.Open(Null);

Elements := DictInst.Elements;

Element := Elements.Item(1);

Element.InsertChildCopy(Elements.Item(2));

End Sub Main;

After executing the example one child element is created for the first element. Data are copied from the second element for a new element.

See also:

IRdsDictionaryElement