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


IArea3D.Centroid3D Property (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IA > IArea3D Interface > IArea3D.Centroid3D Property
ArcGIS Developer Help

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