I have a layer, which consisting of several square polygons. I want to create an ArcEngine application, which displays corner points coordinates of selected polygon. Can anyone help me?
Hi, Are you stuck with the selection part or the corner point part of the problem?
In case of the corner points, get the envelope of the selected feature. Once you have the envelope, you can directly get the Lower Left & Upper Right co-ordinates.
When you say "display", do you mean like labels? Do you just want to show them as text just above the points, or is it okay with you to highlight the corner points by some overlapping, different colored points?
The envelope method works irrespective of the shape of your polygons...
This is not true. The OP wants the corner coordinates of square/rectangular polygons. Unless those polygons are exactly oriented to the x, y axes using the Envelope method will not return the corner vertex coordinates of that polygon. It will return the coordinates of the envelope that encompasses the polygon. See the examples in the developer help topic for IGeometry.Envelope. To get the coordinates of the vertices that make up the polygon, use the IPointCollection interface.
Nigam, I find coordinates. And now I want that, when I select any polygon, it's corner coordinates shown (as label or ...) over the corner points, and when I select another polygon cleared previous labels and shown next labels. (I can't speak in english well, so sorry for my grammatical mistakes).