CreateTreeHotlink

Creates a 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#

 

ITreeHotlink80 CreateTreeHotlink(

       string MessageID,

       string GroupID = "",

       string Description = "")

 

C++

 

HRESULT CreateTreeHotlink(

       BSTR MessageID,

       BSTR GroupID,

       BSTR Description,

       ITreeHotlink80** pITreeHotlink80)

 

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 IProjectTree80.CreateGroup.

·          Find the group, if you know the name, using IProjectTree80.FindItem.

·          Traverse the Tree using IProjectTree80 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

pITreeHotlink80

An ITreeHotlink80 representing the newly created hotlink.

Exceptions

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