ArcObjects Library Reference (Geometry)  

IPolygon2.GetConnectedComponents Method

Populates an array with polygons that represent connected components of the original. The rings of the output polygons are references to rings in the original.

[Visual Basic .NET]
Public Sub GetConnectedComponents ( _
    ByVal numComponentsRequested As Integer, _
    ByRef components As IPolygon _
)
[C#]
public void GetConnectedComponents (
    int numComponentsRequested,
    ref IPolygon components
);
[C++]
HRESULT GetConnectedComponents(
  long numComponentsRequested,
  IPolygon** components
);
[C++]

Parameters

numComponentsRequested   numComponentsRequested is a parameter of type long components [out]

  components is a parameter of type IPolygon

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. Number of components requested larger than the number of exterior rings

3. If the array is not dimensionned

4. If the polygon is not simple

 

 

[C#]

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

See Also

IPolygon2 Interface