Inserts a new path at the specified index containing the specified points.

Namespace:  ESRI.ArcGISExplorer.Geometry

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

Syntax

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

Parameters

pathIndex
Type: System..::.Int32

The index of the new path within the Polyline.
points
Type: System.Collections.Generic..::.IEnumerable<(Of <(Point>)>)

A generic enumerable set of Point objects to copy into the new path within the Polyline.

Remarks

Use this method to insert a new path containing a copy of the specified points at the specified index position in a Polyline. Any following existing paths in the Polyline will increase their index position by 1. This method can be used instead of separate calls to AddPath()()() and AddPoints(Int32, IEnumerable<(Of <(Point>)>)). If the pathIndex is equal to the number of paths, this method behaves like the AddPath(IEnumerable<(Of <(Point>)>)) method, copying the points in to a new path after all existing paths.

Alternatively, use the [O:ESRI.ArcGISExplorer.Geometry.Polyline.InsertPoints]method to insert points in an existing path, or [O:ESRI.ArcGISExplorer.Geometry.Polyline.AddPath] to add a new path as the last path in the Polyline.

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 pathIndex must not be greater than the number of existing paths in Polyline.

See Also