ArcGIS Explorer Component Help |
Polygon..::.SetPoint Method (Int32, Point) |
Polygon Class See Also |
Assembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public void SetPoint( int pointIndex, Point pt ) |
Visual Basic (Declaration) |
---|
Public Sub SetPoint ( _ pointIndex As Integer, _ pt As Point _ ) |
Parameters
- pointIndex
- Type: System..::.Int32
The index of the existing Point to replace.
- pt
- Type: ESRI.ArcGISExplorer.Geometry..::.Point
The Point to set into the pointIndex.
Remarks
Use this method to set a new Point into a Polygon by replacing an existing Point (instead of using RemovePointAt followed by InsertPoint); the new point will have the specified pointIndex and all other existing points in the Polygon remain the same.
For a multipart Polygon, the Point is set into the first ring; if working with multipart polygons, see the SetPoint(Int32, Int32, Point) overload in which a ring index can be specified to set the new Point into.
Note that the CoordinateSystem property of any new points added, inserted or set into existing an existing Polygon or Polyline will be discarded, and the coordinates (X and Y properties) of the point assumed to be in the same CoordinateSystem as the Polygon or Polyline to which they are added.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentOutOfRangeException | The specified pointIndex must exist in the Polygon. |