CreateArrow

Creates a 2-dimensional arrow and places it in the 3D Window.

 

JavaScript

 

CreateArrow(

       Position,

       Length,

       Style,

       LineColor,

       FillColor,

       GroupID,    

       Description )

 

C#

 

ITerrainArrow80 CreateArrow(

       IPosition80 Position,

       double Length,

       int Style = 4,

       object LineColor = -16711936,

       object FillColor = -10197916,

       string GroupID = "",

       string Description = "")

 

C++

 

HRESULT CreateArrow(

       IPosition80 * Position,

       double Length,

       long Style,

       VARIANT LineColor,

       VARIANT FillColor,

       BSTR GroupID,

       BSTR Description,

       ITerrainArrow80 ** pITerrainArrow80) 

Parameters

Position

An IPosition80 representing the position and orientation of the object on the terrain.

Length

The length of the arrow from head to tail in meters.

Style

The style of the arrow. Can be one of the following:
 2d-Arrow-Style-COM

LineColor

The color of the lines that make up the arrow. The color value is used to specify color and transparency values. This parameter can be any of the following:

·          An IColor80 object.

·          A number which represents the color in ABGR format (0xAABBGGRR). The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; the third byte contains a value for blue. The high-order byte contains a value for alpha.

·          A string that represents HTML color format (“#RRGGBB”).

FillColor

The color which fills the arrow, if the alpha value is greater than zero. The color value is used to specify color and transparency values. This parameter can be any of the following:

·          An IColor80 object.

·          A number which represents the color in ABGR format (0xAABBGGRR). The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; the third byte contains a value for blue. The high-order byte contains a value for alpha.

·          A string that represents HTML color format (“#RRGGBB”).

GroupID

The Project Tree group in which the arrow 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 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 arrow as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.

Return Value

pITerrainArrow80

An ITerrainArrow80, representing the newly created arrow.

Exceptions

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

Remarks

At creation time, the elevation parameter indicates the tip of the arrow’s head above the terrain. If the client wants to later change that (via the object’s SetPosition method), the height is measured from the center of the arrow.