Replaces the points beginning at the specified index within the Polygon with a copy of the specified points. If the Polygon has more than one ring, the Point is set into the first ring.

Namespace:  ESRI.ArcGISExplorer.Geometry

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public void SetPoints(
	int firstPointIndex,
	IEnumerable<Point> points
)
Visual Basic (Declaration)
Public Sub SetPoints ( _
	firstPointIndex As Integer, _
	points As IEnumerable(Of Point) _
)

Parameters

firstPointIndex
Type: System..::.Int32

The index of the first existing Point to replace.
points
Type: System.Collections.Generic..::.IEnumerable<(Of <(Point>)>)

A generic enumerable set of Point objects to copy in to the Polygon, beginning at firstPointIndex.

Remarks

Use this method to set multiple new points into the Polygon by replacing the same number of existing points (instead of using RemovePointsAt followed by InsertPoints); the new points will begin at the specified firstPointIndex and all other existing points in the Polygon remain the same.

For a multipart Polygon, only the first ring is changed; if the RingCount is greater than 1, then the points are always set into the first ring in the Polygon; if working with multipart polygons, see the SetPoints(Int32, Int32, IEnumerable<(Of <(Point>)>)) overload in which a ring index can be specified.

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

ExceptionCondition
System..::.ArgumentOutOfRangeExceptionThe specified firstPointIndex must exist in the Polygon.

See Also