MoveRequirements Method
Moves the requirements to be child nodes of the specified parent.
Visual Basic
Public Sub MoveRequirements( _
   ByVal reqIDs As String, _
   ByVal NewPositions As String, _
   ByVal NewParentId As Long _
A quoted, comma-separated list of Req IDs. For example "1, 2, 3".
A quoted, comma-separated list of positions. For example "1, 2, 3". The positions are 1-based.
The Req ID of the requirement under which to move the requirements.

The Req objects will be ordered under the new parent according to the positions specified by the NewPositions argument.

The Reqs are handled one at a time. The position for the working Req cannot be greater than the total number of Req objects under the new parent. For example, when moving four Reqs under an empty parent, setting the order to "2, 1, 3, 4" will fail because when the first Req is handled, there are not 2 Reqs under the parent.

The list of IDs and the list of positions must be the same length. The first position applies to the first ID, and so on. To place a requirement last, pass tagTDAPI_POS_ORDER.TDPOSITION_LAST as the new position.

If a position number is repeated, the second Req with the same position is inserted before the previously placed Req at the specified position, thereby moving all lower items down one position.


See Also