Home > Working with SGWorld > ProjectTree (IProjectTree6) > GetNextItem

GetNextItem

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

 

JavaScript

 

GetNextItem(

      ItemID,

      Code)

 

C#

 

int GetNextItem(

      int ItemID,

      ItemCode Code)

 

C++

 

HRESULT GetNextItem(

      LONG_PTR ItemID,

      ItemCode Code,

      LONG_PTR * 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.

Return Value

pVal

The ID of the item found while using the ItemID as the reference and the Code as the place to find the new item.

Exceptions

See: HRESULT Return Values for a list of possible values returned by the HRESULT.