You can call this method to retrieve the tree item that has the specified relationship, indicated by the Code parameter, to ItemID.
Supported by TerraExplorer Viewer.
HRESULT GetNextItem (
[in] long ItemID,
[in] ItemCode Code,
[out, retval] long *pVal)
Parameters:
ItemID – The reference item from which the next item is located.
Code – An enum that indicates what item is being searched (In relation to the ItemID parameter).
SELECTED – 10
The next selected item.
CHILD – 11
The first child item of ItemID.
FIRSTVISIBLE – 12
The first visible item in the tree.
NEXT – 13
The next sibling item of ItemID.
NEXTVISIBLE – 14
The next visible item after ItemID.
PARENT – 15
The parent item of ItemID.
PREVIOUS – 16
The previous sibling item of ItemID.
PREVIOUSVISIBLE – 17
The previous visible item before ItemID.
ROOT – 18
The root of the tree.
pVal – Once the method call is returned, pVal contains the ID of the item found while using the ItemID as the reference and the Code as the place to find the new item.
Return Values:
The return value obtained from the returned HRESULT can be one of the following:
Return value |
Meaning |
S_OK |
Success. |
E_FAIL |
Catastrophic failure. |
TE_E_MPTNOTLOADED |
An MPT file must be loaded in TerraExplorer for this method to work. |
TE_E_NOLICENSE |
You are running TerraExplorer Viewer and therefore do not have permission to work with this interface. |
Remarks:
This method can be used to traverse the information tree.
See: “Finding
and modifying objects”.