ArcGIS Explorer Component Help |
Polyline..::.AddPoint Method (Int32, Point) |
Polyline Class See Also |
Assembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public void AddPoint( int pathIndex, Point pt ) |
Visual Basic (Declaration) |
---|
Public Sub AddPoint ( _ pathIndex As Integer, _ pt As Point _ ) |
Parameters
- pathIndex
- Type: System..::.Int32
The index of the path to add a copy of pt to.
- pt
- Type: ESRI.ArcGISExplorer.Geometry..::.Point
A Point to copy in to the Polyline.
Remarks
This overload of the AddPoint method is often used as the simplest way to build up the vertices of a new multipart Polyline, by adding a single Point at a time to the specified path after any existing points in that path. The [O:ESRI.ArcGISExplorer.Geometry.Polyline.AddPoints] method may be a useful alternative if multiple points can be added at once. Alternatively if the vertices of a Polyline are known before the polylines object is instantiated, one or more points can be added in the overloaded Polyline constructors.
The specified pathIndex must already exist in the Polyline; use the [O:ESRI.ArcGISExplorer.Geometry.Polyline.AddPath] method to add a new path to the Polyline. If only working with single part polylines, an alternative is the AddPoint(Point) overload.
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 pathIndex must already exist in the Polyline. |