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

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

IVectorization.Vectorize Method

Find the geometries in the target raster.

[Visual Basic .NET]
Public Sub Vectorize ( _
    ByVal useSelection As Boolean, _
    ByVal extent As IEnvelope, _
    ByVal callbackGeom As INotifyGeometryFound, _
    ByVal cancel As ITrackCancel, _
    ByVal stepProgressor As IStepProgressor _
public void Vectorize (
    bool useSelection,
    IEnvelope extent,
    INotifyGeometryFound callbackGeom,
    ITrackCancel cancel,
    IStepProgressor stepProgressor

Product Availability

Available with ArcGIS Desktop. Requires ArcScan Extension.


This method is called by the Generate Features command and the Generate Features Inside Area tool.



The following code shows an example of this method in C#.

//You can get app from ICommand :: OnCreate() hook parameter
public void Vectorize(IApplication app)
  if (app != null)
    IVectorization vectorization = app.FindExtensionByName("ESRI ArcScan Tools") as IVectorization;
    IMxDocument mxDoc = app.Document as IMxDocument;
    INotifyGeometryFound notifyGeom = new FoundGeom();
    vectorization.Vectorize(false, mxDoc.ActiveView.Extent, notifyGeom, null, null);

Also create a new class (FoundGeom) with the following code. This provides the callback mechanism for the returned geometry.

public class FoundGeom : INotifyGeometryFound
  public FoundGeom()
  #region INotifyGeometryFound Members
  void INotifyGeometryFound.AddGeometry(IGeometry shape, double LineWidth)
    System.Windows.Forms.MessageBox.Show("Found geometry type " + shape.GeometryType);

See Also

IVectorization Interface