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


Vectorization Class (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (ArcScan)  

Vectorization Class

The Vectorization ArcMap Extension.

Vectorization is a non-creatable object. References to non-creatable objects must be obtained through other objects.

Product Availability

Available with ArcGIS Desktop. Requires ArcScan Extension.

Supported Platforms

Windows

Interfaces

Interfaces Description
IConnectedCells Provides access to members that locate connected cells.
IExtension (esriSystem) Provides access to members that define an extension.
IPersist Defines the single method GetClassID, which is designed to supply the CLSID of an object that can be stored persistently in the system. IPersist is the base interface for three other interfaces: IPersistStorage, IPersistStream, and IPersistFile.
IPersistStream (esriSystem)
IRasterSnappingProperties Provides access to members that control the behavior of the raster snapping environment.
IVectorization Provides access to members that control the behavior of the vectorization tools.
IVectorization2 Provides access to members that control the behavior of the vectorization tools.
IVectorizationBatchProperties Provides access to members that control the behavior of the batch vectorization environment.
IVectorizationBatchProperties2 Provides access to members that control the behavior of the batch vectorization environment.
IVectorizationLayers Provides access to members that control information about layers to be vectorized.
IVectorizationProperties Provides access to members that control the behavior of the vectorization tools.

Event Interfaces

Interfaces Description
IVectorizationEvents (default) Provides access to vectorization events. Implement it to listen for specific events that occur during a vectorization session.

Remarks

The Vectorization object is the primary ArcScan extension object in ArcMap.

To get a reference to the vectorization extension, use IApplication::FindExtensionByCLSID or IApplication::FindExtensionByName.

When working with the ArcScan object model, remember to reference the ESRI ArcScan Extension Object Library in your development environment.

[C#]

The following examples show both methods being used to acquire a reference of type IVectorization to the Vectorization object in C#.

public void GetArcScanByCLSID()
{
  UID arcScanUid=new UIDClass(); 
  arcScanUid.Value="esriArcScan.Vectorization";
  //Or arcScanUid.Value="{A212F759-F155-4BAF-A692-B9268CF9A465}";

  //You can get app from ICommand :: OnCreate() hook parameter
  IVectorization vectorization=app.FindExtensionByCLSID(arcScanUid) as IVectorization;
}

public void GetArcScanByName()
{
  //You can get app from ICommand :: OnCreate() hook parameter
  IVectorization vectorization=app.FindExtensionByName("ESRI ArcScan Tools") as IVectorization;
}

Working with Events

public void WireArcScanEvents()
{
  //You can get app from ICommand :: OnCreate() hook parameter
  IVectorization vectorization=app.FindExtensionByName("ESRI ArcScan Tools") as IVectorization;
  ((IVectorizationEvents_Event)vectorization).OnRasterTargetChanged += 
    new IVectorizationEvents_OnRasterTargetChangedEventHandler(OnRasterTargetChanged);
}
void OnRasterTargetChanged()
{
  System.Windows.Forms.MessageBox.Show("Raster Changed.");
}
[Visual Basic .NET]

The following examples show both methods being used to acquire a reference of type IVectorization to the Vectorization object in VBNet.

  Public Sub GetArcScanByCLSID()
    'You can get app from ICommand :: OnCreate() hook parameter
    Dim arcScanUid As UID=New UIDClass()
    arcScanUid.Value="esriArcScan.Vectorization"
    'Or arcScanUid.Value="{A212F759-F155-4BAF-A692-B9268CF9A465}"

    Dim vectorization As IVectorization=TryCast(app.FindExtensionByCLSID(arcScanUid), IVectorization)
  End Sub

  Public Sub GetArcScanByName()
    Dim vectorization As IVectorization=TryCast(app.FindExtensionByName("ESRI ArcScan Tools"), IVectorization)
  End Sub

Working with Events

  Public Sub WireArcScanEvents(ByVal app As IApplication)
    'You can get app from ICommand :: OnCreate() hook parameter
    If Not app Is Nothing Then
      Dim vectorization As IVectorization=TryCast(app.FindExtensionByName("ESRI ArcScan Tools"), IVectorization)

      'Wire ArcScan events
      AddHandler (CType(vectorization, IVectorizationEvents_Event).OnRasterTargetChanged , _
        AddressOf OnRasterTargetChanged
    End If
  End Sub

  Private Sub OnRasterTargetChanged()
    System.Windows.Forms.MessageBox.Show("Raster Changed.")
  End Sub

Working with Events

[Visual Basic 6.0]

When working with Vectorization's default outbound interface in Visual Basic 6 declare variables as follows:

Private WithEvents pVectorization as Vectorization