CreateTextLabel

The CreateLabel method creates a text label in the 3D Window.

Note:    If you want to create an image label use the CreateLabel or CreateImageLabel methods.

 

JavaScript

 

CreateTextLabel(

       Position,

       Text,

       LabelStyle,

       GroupID,

       Description )

 

C#

 

ITerrainLabel65 CreateTextLabel(

       IPosition65 Position,

       string Text,

       [ILabelStyle65 LabelStyle = 0],

       [string GroupID = ""],

       [string Description = ""])

 

C++

 

HRESULT CreateTextLabel(

       IPosition65* Position,

       BSTR Text,

       ILabelStyle65 LabelStyle,

       BSTR GroupID,

       BSTR Description,

       ITerrainLabel65** pITerrainLabel65)

 

Parameters

Position

An IPosition65 representing the position and orientation of the label on the terrain.

Text

The label text.

LabelStyle

An ILabelStyle65 representing the label style (e.g. color, font and viewing distance properties).

GroupID  

The Project Tree group in which the label is created. If it is set to an empty string, the object is created under the root. You can obtain the GroupID by one of the following methods:

·          Create the group using IProjectTree65.CreateGroup.

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

·          Traverse the Tree using IProjectTree65 methods such as GetNextItem, until you come to the desired GroupID.

Description

The name of the label as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pITerrainLabel65 

An ITerrainLabel65 representing the newly created label.

Exceptions

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