iaminsu12

How to extract vertices from IPolyline or IPolygon

Discussion created by iaminsu12 on Jun 27, 2012
Latest reply on Jun 27, 2012 by whe-esristaff
Hi,


How can I extract vertices from IPolygon or IPolyline or IGeometry object and insert those vertices to existing feature?

I extracted vertices from IPolygon to IPointCollection, but IPointCollection object failed at below codes

using (ComReleaser comReleaser = new ComReleaser())
                {
                    IFeatureBuffer fcBuffer = fcTotalVertices.CreateFeatureBuffer();
                    comReleaser.ManageLifetime(fcBuffer);
                    fcBuffer.Shape = (IGeometry)pcVertices;
                    curTotalVertices = fcTotalVertices.Insert(true);
                    comReleaser.ManageLifetime(curTotalVertices);
                    curTotalVertices.InsertFeature(fcBuffer);
                    curTotalVertices.Flush();
                }


pcVertices is IPointCollection object.


How can I do this?




Thank you.

Outcomes