Home > Working with SGWorld > ISGWorld > OnProjectTreeAction

OnProjectTreeAction

This event event occurs when certain actions (e.g., showing and hiding items) are performed on Project Tree items.

 

JavaScript

 

OnProjectTreeAction(

      ItemID,

      Action)

 

C#

 

void OnProjectTreeAction(

      int ItemID,

      IAction6 Action)

 

C++

 

HRESULT OnProjectTreeAction(

      LONG_PTR ItemID,

      IAction6* Action)

Parameters

ItemID

The Project Tree ID of the object on which the action was performed.

Action

An IAction6 representing the action that is performed on an item. The following are possible values:

·         AC_DELETE = 15
The object was deleted.

·         AC_SHOW = 19
A show or hide action was performed by clicking on the item show/hide icon.

·         AC_SELCHANGED = 21
The current selected item(s) has changed.

·         AC_GROUP_ADDED = 23
A group was added .

·         AC_LAYER_ADDED = 24
A layer was added .

·         AC_LAYER_ REFRESHED = 25
A layer was refreshed.

·         AC_ITEM_MOVED = 26
An item was moved to a different location.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

The group ID entered does not represent a valid group in the project tree.

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Can not use tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

ItemID is a group so an object cannot be retrieved.