ArcGIS Explorer Component Help |
Polyline..::.GetPaths Method |
Polyline Class Example See Also |
Gets the a copy of the points in all of the path of the Polyline.
Namespace:
ESRI.ArcGISExplorer.GeometryAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public IList<IList<Point>> GetPaths() |
Visual Basic (Declaration) |
---|
Public Function GetPaths As IList(Of IList(Of Point)) |
Return Value
An enumerable generic list, in which each item is an enumerable generic list of points which are copies of the points in one path of the Polyline.Remarks
Use this method to get an object containing a copy of all the points in all the paths of a multipart Polyline. For a single part Polyline, the returned list will contain a single list of points from the single path in the Polyline.
For an empty Polyline, GetPaths will return a list with 0 items.
Examples
The code below shows how to use the GetPaths method to enumerate over each vertex in each path in a Polyline.
The code assumes there is an existing Polyline called pline, and works for both multipart and single part polylines.
CopyC#
// For an existing Polyline called pline, use GetPaths to iterate all points in all paths of the Polyline. foreach (List<ESRI.ArcGISExplorer.Geometry.Point> path in pline.GetPaths()) { foreach (ESRI.ArcGISExplorer.Geometry.Point pt in path) { System.Diagnostics.Debug.WriteLine(pt.ToString()); } }
CopyVB.NET
' For an existing Polyline called pline, use GetPaths to iterate all points in all paths of the Polyline. For Each path As List(Of ESRI.ArcGISExplorer.Geometry.Point) In pline.GetPaths() For Each pt As ESRI.ArcGISExplorer.Geometry.Point In path System.Diagnostics.Debug.WriteLine(pt.ToString()) Next Next