CreateTerrainModifier

The CreateTerrainModifier method creates a Modify Terrain object in the 3D Window.

See: “Modify Terrain” section under the “Terrain Objects” chapter of the User Manual.

 

HRESULT CreateTerrainModifier(

[in, optional, defaultvalue(0)] VARIANT SafeArrayVertices,

[in, optional, defaultvalue(0)] ElevationBehaviorMode Mode,

[in, optional, defaultvalue(1)] long Flat,

[in, optional, defaultvalue(0)] double Feather,

[in, optional, defaultvalue(0)] long GroupID,

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

[out, retval] ITerrainModifier5** pITerrainModifier5)

Parameters:

The ElevationBehaviorMode enum can use any of the following values:

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.