Generates a geometry from the given fromPt to the given toPt.
[Visual Basic .NET] Public Function TraceBetweenPoints ( _ ByVal fromPt As IPoint, _ ByVal toPt As IPoint, _ ByVal tolerance As Double, _ ByVal cancel As ITrackCancel _ ) As IPolyline
[C#] public IPolyline TraceBetweenPoints ( IPoint fromPt, IPoint toPt, double tolerance, ITrackCancel cancel );
Product Availability
Available with ArcGIS Desktop. Requires ArcScan Extension.
Remarks
This method is called by the Vectorization Trace Between Points tool on the ArcScan toolbar.
The fromPt is the initial start point, and the toPt is the end point. A raster line within the tolerance is traced from fromPt to toPt, and the vector is returned as IPolyline. In the tool, this is used to create sketch geometry.
[C#]
The following code shows an example of this method in C#.
//You can get app from ICommand :: OnCreate() hook parameter
IVectorization2 vectorization2 = app.FindExtensionByName("ESRI ArcScan Tools") as IVectorization2;
ESRI.ArcGIS.Geometry.IPoint fromPoint = new ESRI.ArcGIS.Geometry.Point();
ESRI.ArcGIS.Geometry.IPoint toPoint = new ESRI.ArcGIS.Geometry.Point();
fromPoint.PutCoords(3345145.328, -3700127.032);
toPoint.PutCoords(3982778.972, -3932119.574);
ESRI.ArcGIS.Geometry.IPolyline = vectorization2.TraceBetweenPoints(
fromPoint, toPoint, 50, null);