Assembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public void InsertPoint( int pointIndex, Point pt ) |
Visual Basic (Declaration) |
---|
Public Sub InsertPoint ( _ pointIndex As Integer, _ pt As Point _ ) |
Parameters
- pointIndex
- Type: System..::.Int32
The point index to copy the new Point into.
- pt
- Type: ESRI.ArcGISExplorer.Geometry..::.Point
The Point to copy into the Polygon.
Remarks
Use this method to insert a new Point into a Polygon with existing points; the inserted point will have the specified pointIndex and all following points in the Polygon will increase their index position by 1. If the pointIndex is equal to the number of points, this method behaves like the AddPoint method, copying the Point after all existing points.
For a multipart Polygon, only the first ring is changed; if the RingCount is greater than 1, then the Point is always inserted into the first ring in the Polygon; if working with multipart polygons, see the InsertPoint(Int32, Int32, Point) overload in which a ring index can be specified to insert 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..::.InvalidOperationException | A Point cannot be inserted into an empty Polygon. |
System..::.ArgumentOutOfRangeException | The specified pointIndex must not be greater than the number of existing points in the Polygon. |