Home > Working with SGWorld > Creator (ICreator6) > CreateHoleOnTerrain

CreateHoleOnTerrain

The CreateHoleOnTerrain method creates a Hole On Terrain object in the 3D Window.

 

JavaScript

 

CreateHoleOnTerrain(

      pIGeometry,

      GroupID ,

      Description )

 

C#

 

ITerrainHole6 CreateHoleOnTerrain(

      IGeometry   pIGeometry,

      int         GroupID = 0,

      string      Description = "")

 

C++

 

HRESULT CreateHoleOnTerrain(

       IGeometry *      pIGeometry,

       LONG_PTR         GroupID,

       BSTR             Description,

       ITerrainHole6 **  pITerrainHole6) 

 

Parameters

pIGeometry

An IGeometry representing geometric properties and behavior of the HoleOnTerrain.

GroupID

The Project Tree group in which the hole on terrain 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 IProjectTree6.CreateGroup.

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

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

Description

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

Return Value

pITerrainHole6

An ITerrainHole6, representing the newly created Hole on Terrain.

Exceptions

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