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

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 Polyline, beginning at firstPointIndex.

Remarks

Use this method to set multiple new points into the Polyline 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 Polyline remain the same.

For a multipart Polyline, only the first path is changed; if the PathCount is greater than 1, then the points are always set into the first path in the Polyline; if working with multipart polylines, see the SetPoints(Int32, Int32, IEnumerable<(Of <(Point>)>)) overload in which a path 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 Polyline.

See Also