CreateTreeHotlink

This method creates an Information Tree entry that has only a hotlink that is not attached to a terrain object.

 

HRESULT CreateTreeHotlink (

[in] BSTR MessageID,

[in, defaultvalue(0)] long GroupID,

[in, defaultvalue("")] BSTR Description,

[out, retval] ISingleMessageObject5** pISingleMessageObject5)

Parameters:

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_INFOTREE_PARENTNOTGROUP

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

TE_E_INTERNAL

TerraExplorer was unable to create the object. To get more information about this error use the IErrorInfo Interface.

TE_E_NOLICENCE

Your license does not allow the use of this feature.

 

Remarks:

In most cases, if an entry in the Information Tree is not a group, it usually represents an object on the terrain. It is, however, sometimes necessary to create an entry in the Information 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.