This document is archived and information here might be outdated.  Recommended version.

IVectorization2.TraceBetweenPoints Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > ArcScan > ESRI.ArcGIS.ArcScan > Interfaces > IV > IVectorization2 Interface > IVectorization2.TraceBetweenPoints Method
ArcGIS Developer Help

IVectorization2.TraceBetweenPoints Method

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
public IPolyline TraceBetweenPoints (
    IPoint fromPt,
    IPoint toPt,
    double tolerance,
    ITrackCancel cancel

Product Availability

Available with ArcGIS Desktop. Requires ArcScan Extension.


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.


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);

See Also

IVectorization2 Interface