Convert AV3 to AV8 Attribute Indexes


Since ArcView 3 attribute indexes are not supported by ArcGIS 8, you will need to convert your existing indexes. This sample converts ArcView 3 attributes indexes to attribute indexes that can be used in ArcGIS 8. The DLL contains a command that can be added to folder context menus in ArcCatalog. When the command is executed, all shapefiles and dBASE files in the current folder and all sub folders are searched. A new ArcGIS 8 attribute index is created for all fields found in these files that have an ArcView 3 attribute index.

A report is file named 3to8index.txt is created in the current folder. The report indicates weather or not new indexes were created and if so the fields that were indexed for each file. It also specifies which directories were searched. If a file named 3to8index.txt exists in the current directory, it is over-written when the command is executed.

This sample does not convert coverage attribute indexes or spatial indexes as these are supported by ArcGIS 8.

How to use:
  1. Start ArcCatalog, and display the Customize Dialog.
  2. In the Customize dialog, click on Add from file and select this sample's dll.
  3. In the Customize dialog, Toolbars tab, check Context Menus. In the Context Menus toolbar that comes up, navigate to Context Menus; Folder Context Menu, and open it.
  4. Under the Commands tab of the Customize dialog, select the 3to8index command from the 'Developer Samples' category and drag it onto the Folder context menu. Close the Customize dialog.
  5. You can also repeat steps 3 and 4 to add the command to the Folder Connection context menu or you can drag the command on to a toolbar while the customize dialog is opened.
  6. Navegate to the folder from which you want to start the conversion in ArcCatalog.
  7. Right-click the folder and choose the 3to8index command.
  8. This starts the process of converting the attribute indexes. To stop the process, either click the cancel button on the progress dialog or hit the escape key.
  9. When the process finishes, open the file named 3to8index.txt in the folder from which you initialed the process and investigate the results.
  10. This samples uses the Microsoft Scripting Runtime DLL (scrrun.dll). The command will not work if this dll is not registered on your system.


Difficulty: Intermediate

Visual Basic
File Description
clsAV3toAV8.cls Implementation of ArcCatalog command to convert ArcView 3 to ArcGIS 8 attribute indexes.
ConvertAttIndex.vbp VB project file for sample.
ConvertAttIndex.dll Compiled project DLL.

Key CoClasses: CancelTracker, ProgressDialogFactory, GxCatalog, ShapefileWorkspaceFactory, Index
Key Interfaces: IGXApplication, IGXCatalog, IGXObject, IGxObjectContainer, ITable, ITrackCancel, IIndex