InsertElement method (ILEADDicomDS)

VB.NET example

C# example

Visual Basic example

Visual C++ 6.0 example

 

Syntax

short InsertElement ( BOOL bChild, long lTag, short nVR, BOOL bSequence, long lIndex );

Overview

Refer to Working with Data Sets.

Remarks

Inserts a new item in the Data Set, based on the value of bChild. If the element is successfully inserted, the CurrentElement property will be updated with the new item.

The illustrations below show how items are added to the Data Set (internally maintained as a tree), based on the value of bChild.

For the sake of these illustrations, the order of siblings is top to bottom. Therefore, since added items become the last sibling or the last child, these are drawn at the bottom of the appropriate group of items.

In this illustration, the CurrentElement property contains Item 1 and bChild is False. The new item is added as the last sibling of Item 1.

image\IODIsSib.gif

In this illustration, the CurrentElement property contains Item 1 and bChild is True. The new item is added as the last child of Item 1.

image\IODIsChd.gif

See Also

Elements:

DeleteElement method

Topics:

Data Sets: Inserting and Deleting Data Set Members