1、获取选中图形:ISelectionSet pSelSet = (pFeaLyr as IFeatureSelection).SelectionSet;
pSelSet.Search(null, false, out pCursor);
IFeatureCursor pFeaCursor = pCursor as IFeatureCursor;
2、利用Union工具组合所有图形
IGeometryBag pGeoBag = new GeometryBagClass();
IGeometryCollection pGeoCol = pGeoBag as IGeometryCollection;
3、判断是否为外环图形:
IPolygon pGeoPolygon = pGeometry as IPolygon;
int iExRingsCnt = pGeoPolygon.ExteriorRingCount;
if (iExRingsCnt > 0)
4、将组合图形转换为:IGeometryB