CreateLineOfSight

Creates a visual marker for the existence of a line of sight between two points.

 

JavaScript

 

CreateLineOfSight(ViewerPosition, SampleInterval, arrTargetPosition, GroupID, Description)

 

C#

 

ILineOfSight61 CreateLineOfSight(

       IPosition61 ViewerPosition,

       double SampleInterval,

       object arrTargetPosition,

       int GroupID,

       string Description)

 

C++

 

HRESULT CreateLineOfSight(

        IPosition61ViewerPosition,

        double SampleInterval,

        VARIANT arrTargetPosition,

        LONG_PTR GroupID,

        BSTR  Description,

        ILineOfSight61 ** pLineOfSight) 

Parameters

ViewerPosition

The position of the viewer, defined by its coordinates in the  3D world.

SampleInterval

The distance between terrain samples for the measurement along each line. A smaller sample size is more accurate but slower to calculate.

arrTargetPosition

An array of IPosition61 objects that contains the target positions in the 3D World.

GroupID

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

§  Create the group using IProjectTree61.CreateGroup.

§  Find the group, if you know the name, using IProjectTree61.FindItem.

§  Traverse the Tree using IProjectTree61 methods such as GetNextItem (), until you come to the desired GroupID.

Description

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

Return Value

pLineOfSight

An ILineOfSight61 representing the line of sight visual marker created.

Exceptions

HRESULT can return any of the values listed in the HRESULT Return Values list, as well as the following values:

TE_E_INFOTREE_PARENTNOTGROUP

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

TE_E_INFOTREE_ITEMNOTGROUP

The item entered is not a group and therefore cannot be used as a group.

TE_E_INFOTREE_CANTUSEROOT

Can not use tree root for this operation

TE_E_INFOTREE_ITEMISGROUP

ItemID is a group so an object cannot be retrieved.