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


IPolygon2.GetOutermostComponents Method (ArcObjects .NET 10.7 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IP > IPolygon2 Interface > IPolygon2.GetOutermostComponents Method
ArcGIS Developer Help

IPolygon2.GetOutermostComponents Method

Populates an array with polygons that represent outermost components of the original and all components within (islands within lakes). The rings of the output polygons are references to rings in the original.

[Visual Basic .NET]
Public Sub GetOutermostComponents ( _
    ByVal numComponentsRequested As Integer, _
    ByRef numComponentsReturned As Integer, _
    ByRef components As IPolygon, _
    ByRef moreComponentsExist As Boolean _
)
[C#]
public void GetOutermostComponents (
    int numComponentsRequested,
    ref int numComponentsReturned,
    ref IPolygon components,
    ref bool moreComponentsExist
);
[C++]
HRESULT GetOutermostComponents(
  long numComponentsRequested,
  System.Int32* numComponentsReturned,
  IPolygon** components,
  Boolean* moreComponentsExist
);
[C++]
Parameters
numComponentsRequested 

numComponentsRequested is a parameter of type long numComponentsReturned [out]
numComponentsReturned is a parameter of type long* components [out]
components is a parameter of type IPolygon** moreComponentsExist [out]
moreComponentsExist is a parameter of type bool*

Product Availability

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

Remarks

The method returns an error in the following cases:

1. Number of components requested is smaller than 0

2. If the array is not dimensionned

3. If the polygon is not simple

[C#]

Does not work in .NET. Use IPolygon4.get_OutermostComponentBag instead.

See Also

IPolygon2 Interface