This document is archived and information here might be outdated.  Recommended version.


IArea3D.Centroid3D Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

IArea3D.Centroid3D Property

A 3D point whose XY coordinates are set to the center of gravity of the shape�s 2D footprint and Z set to the shape�s ZMax.

[Visual Basic .NET]
Public ReadOnly Property Centroid3D As IPoint
[C#]
public IPoint Centroid3D {get;}
[C++]
HRESULT get_Centroid3D(
  IPoint** Center
);
[C++]

Parameters Center [out, retval]
Center is a parameter of type IPoint

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.
[C#]

 

        public static void GetCentroid3D()

        {

               IGeometry multiPatchGeometry=GetMultiPatchGeometry();

               IArea3D area3D = multiPatchGeometry as IArea3D;

               IPoint centroid3D=area3D.Centroid3D;

               //centroid3D = (0, 0, 8.5)
        }

See Also

IArea3D Interface