//Create a geometry for the line. IPolyline polyline = new PolylineClass(); polyline.FromPoint = point1; polyline.ToPoint = point3; // Build the feature. IFeature feature = featureClass.CreateFeature(); feature.Shape = polyline;
Dim polyline As IPolyline = New Polyline Dim pointCollection As IPointCollection = polyline pointCollection.AddPoint(point) ' repeat until all points are added
//Create the geometry IPolyline polyline = new PolylineClass(); IPointCollection pointCollection = polyline as IPointCollection; pointCollection.AddPoint(point1, ref missing, ref missing); pointCollection.AddPoint(point2, ref missing, ref missing); pointCollection.AddPoint(point3, ref missing, ref missing); // Build the feature. IFeature feature = featureClass.CreateFeature(); feature.Shape = pointCollection as IPolyline;