ESRI.ArcGIS.E2API Feedback via the User Forum
Polyline Class
See Also  Members   Example 
ESRI.ArcGIS.E2API Namespace : Polyline Class


A linear geometry representing an ordered sequence of points.

Object Model



Syntax

Visual Basic (Declaration) 
<ComVisibleAttribute(False)>
Public NotInheritable Class Polyline 
   Inherits Geometry
Visual Basic (Usage)Copy Code
Dim instance As Polyline
C# 
[ComVisibleAttribute(false)]
public sealed class Polyline : Geometry 

Example

This example demonstrates how to create a Polyline from London to Paris. The Polyline is used as a Geomtery for a PlaceResult.
C#Copy Code
//Create Task Context. 
TaskContext newTaskContext = new TaskContext(); 
newTaskContext.TaskName = "MyCustomTask.CustomTask"; 
newTaskContext.TaskUIName = _taskUI.Name; 
 
ESRI.ArcGIS.E2API.PlaceResult MyPlaceResult = new PlaceResult(); 
MyPlaceResult.Title = "My Place Result"; 
 
ESRI.ArcGIS.E2API.Polyline MyPolyline = new Polyline(); 
 
//Add points 
MyPolyline.Points.AddPoint(new Point(-0.11, 51.50, 0));//London 
MyPolyline.Points.AddPoint(new Point(2.34, 48.85, 0));//Paris 
 
MyPlaceResult.Geometry = MyPolyline; 
MyPlaceResult.SymbolName = "Red"; 
 
newTaskContext.UpdateResult(MyPlaceResult);
Visual BasicCopy Code
'Create Task Context.
Dim NewTaskContext As TaskContext = New TaskContext()
NewTaskContext.TaskName = "MyCustomTask.CustomTask"
NewTaskContext.TaskUIName = _taskUI.Name

Dim MyPlaceResult As ESRI.ArcGIS.E2API.PlaceResult = New PlaceResult()
MyPlaceResult.Title = "My Place Result"

Dim MyPolyline As ESRI.ArcGIS.E2API.Polyline = New Polyline()

'Add points
MyPolyline.Points.AddPoint(New Point(-0.11,51.50,0))'London
MyPolyline.Points.AddPoint(New Point(2.34,48.85,0))'Paris

MyPlaceResult.GeomeTry = MyPolyline
MyPlaceResult.SymbolName = "Red"

NewTaskContext.UpdateResult(MyPlaceResult)

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.E2API.Geometry
      ESRI.ArcGIS.E2API.Polyline

Platforms

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Version Information

This class was added to the E2API at version 1.0.0.348.

See Also