This document is archived and information here might be outdated. Recommended version. |
The Vectorization ArcMap Extension.
Interfaces | Description |
---|---|
IConnectedCells | Provides access to members that locate connected cells. |
IExtension (esriSystem) | Provides access to members that define an extension. |
IPersist (esriSystem) | |
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. |
IVectorizationEvents | Provides access to vectorization events. Implement it to listen for specific events that occur during a vectorization session. |
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. |
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.
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.");
}
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