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


IVolume.Volume Property (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IVolume.Volume Property

The enclosed 3D volume.

[Visual Basic .NET]
Public ReadOnly Property Volume As Double
[C#]
public double Volume {get;}
[C++]
HRESULT get_Volume(
  double* volumeValue
);
[C++]

Parameters volumeValue [out, retval] volumeValue is a parameter of type double

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Returns the volume of 3D space occupied by a MultiPatch. Handles closed and some non-closed MultiPatches.

Remarks

If Patches comprising a MultiPatch geometry have improperly ordered vertices such that positive faces are not pointing outwards, a negative volume will be returned. To ensure proper orientation, add vertices in a clockwise manner relative to an outside observer.

[C#]

 

        public static void CalculateVolume()

        {

               IGeometry geometry=GetMultiPatchGeometry();


               IVolume
volume=geometry as IVolume;

               double calculatedVolume=volume.Volume;

               //calculatedVolume=225.048

        }

See Also

IVolume Interface