Inserting Structure Elements


For a list of all Structure functions and related topics, see Structures.

An output command is inserted into a structure by setting the structure editing mode to PEXStructureInsert (the default), setting the element pointer to the desired element offset, and calling the appropriate output command functions. In insert mode, each output command sent to a structure creates a structure element and inserts it after the element specified by the element pointer. After each insertion, the element pointer is updated to point to the newly-inserted element.

To illustrate a common case, the element pointer points to the last element in a structure and you want to add structure elements to the end of the structure. Each output command sent to this structure causes a structure element to be added after the last element, and the element pointer is then updated to point to the newly-inserted structure element. Therefore, multiple output commands sent to a structure when the editing mode is PEXStructureInsert result in an ordered list of structure elements being added to the structure.

See also: Positioning of the Element and Element Pointer.