Home > Working with SGWorld > Creator (ICreator6) > CreateTreeHotlink
This method creates an Project Tree entry that has only a hotlink that is not attached to a terrain object. In most cases, if an entry in the Project Tree is not a group, it usually represents an object on the terrain. It is, however, sometimes necessary to create an entry in the Project Tree that can be linked to a web page, for example, without the link actually being related to a terrain object. To create a tree hotlink, you should first create a message object (using the CreateMessage() method) and then pass the ID of that message object to the CreateTreeHotlink() method.
JavaScript |
|
CreateTreeHotlink( MessageID, GroupID , Description ) |
C# |
|
ITreeHotlink6 CreateTreeHotlink( string MessageID, int GroupID = 0, string Description = "") |
C++ |
|
HRESULT CreateTreeHotlink( BSTR MessageID, LONG_PTR GroupID, BSTR Description, ITreeHotlink6** pITreeHotlink6) |
Parameters
MessageID
The ID of the message object that the client wants to have activated once the user clicks on the hotlink in the Project Tree.
GroupID
The Project Tree group in which the hotlink is created. If it is set to zero, the object created in the route. You can obtain the GroupID by one of the following methods:
§ Create the group using IProjectTree6.CreateGroup.
§ Find the group, if you know the name, using IProjectTree6.FindItem.
§ Traverse the Tree using IProjectTree6 methods such as GetNextItem(), until you come to the desired GroupID.
Description
The name of the hotlink as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.
Return Value
pITreeHotlink6
An ITreeHotlink6 representing the newly created hotlink.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.