Create3DPolygon

The Create3DPolygon method creates a 3-dimensional polygon in the 3D Window.

HRESULT Create3DPolygon (

[in, defaultvalue(0)] VARIANT SafeArrayVertices,

[in, defaultvalue(20)] double ObjectHeight,

[in, defaultvalue(0x0000ff00)] long LineColor,

[in, defaultvalue(FT_NONE)] double FillOpacity,

[in, defaultvalue(0x00646464)] long FillColor,

[in, defaultvalue(0)] HeightStyleCode HeightStyle,

[in, defaultvalue(0)] long GroupID,

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

[out, retval] ITerrain3DPolygon5** pITerrain3DPolygon5)

Parameters:

<SCRIPT language="VBSCRIPT">

 

Function CreateVertArray()

 

  Dim vert(9)

 

  vert(0) = -118.82295

  vert(1) = 100.0

  vert(2) = 34.15543

 

  vert(3) = -118.82173

  vert(4) = 100.0

  vert(5) = 34.15387

 

  vert(6) = -118.82284

  vert(7) = 100.0

  vert(8) = 34.15426

 

  CreateVertArray = vert

 

</SCRIPT>

 

See:  “Creating Polyline using 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.