CreateBuilding

The CreateBuilding method creates a building in the 3D Window.

 

HRESULT CreateBuilding (

[in, defaultvalue(0)] VARIANT SafeArrayVertices,

[in, defaultvalue(20)] double RoofHeight,

[in, defaultvalue(BS_STRETCH_TERRAIN)] BuildingStyleCode BuildingStyle,

[in, defaultvalue(0)] HeightStyleCode HeightStyle,

[in, defaultvalue(0)] long GroupID,

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

[out, retval] ITerrainBuilding5** pITerrainBuilding5)

Parameters:


See:  “Creating a Polyline Using a Safe Array of Vertices” for an example of how to create and use a safe array of vertices.

The HeightStyleCode 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.