CreateBuilding
Creates a building in the 3D Window.
JavaScript |
|
CreateBuilding( pIGeometry, RoofHeight, AltitudeType, GroupID, Description ) |
C# |
|
ITerrainBuilding80 CreateBuilding( IGeometry pIGeometry, double RoofHeight = 20, AltitudeTypeCode AltitudeType = AltitudeTypeCode.ATC_TERRAIN_RELATIVE, string GroupID = "", string Description = "") |
C++ |
|
HRESULT CreateBuilding( IGeometry * pIGeometry, double RoofHeight, AltitudeTypeCode AltitudeType, BSTR GroupID, BSTR Description, ITerrainBuilding80 ** pITerrainBuilding80 ) |
Parameters
pIGeometry
An IGeometry representing the geometric properties and behavior of the building.
RoofHeight
The height, in meters, of the building roof.
AltitudeType
An enum that determines the altitude type to be used by the object. The following are the possible values:
· ATC_TERRAIN_RELATIVE = 0
Places the building’s pivot point at a specified altitude above the ground.
· ATC_TERRAIN_ABSOLUTE = 3
Places the building’s pivot point at a specified altitude above the terrain database vertical datum base ellipsoid.
GroupID
The Project Tree group in which the building 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 building as it appears in the Project Tree. If an empty string is passed into this parameter, TerraExplorer assigns it a unique name.
Return Value
pITerrainBuilding80
An ITerrainBuilding80, representing the newly created building.
Exceptions
See: HRESULT Return Values for a list of possible values returned by the HRESULT.