//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;
//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;
Dim polyline As IPolyline = New Polyline Dim pointCollection As IPointCollection = polyline pointCollection.AddPoint(point) ' repeat until all points are added
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.