This sample demonstrates how to create a custom metadata importer to be used
within ArcCatalog. A metadata importer reads information from an
external location and writes it to the selected item's metadata. The source
location may be any type of file or relational database. This example does
not open a file. It writes the string "default title" as the title in the
item's metadata. The importers provided by ArcCatalog replace any existing
metadata with the new set of metadata defined by the importer. This example
instead adds the title to the existing set of metadata; new metadata will be
created if it doesn't already exist. The class defining a metadata importer
must implement the IMetadataImport interface. After creating a custom
importer, you must register it with the ArcCatalog application.
How to use:
Register the dll on your machine.
Run Categories.exe from %ARCHOME%\bin.
Navigate to the 'Metadata Importers' folder. Select the folder and click Add Object.
Navigate to the compiled Importer.dll and click Open.
The Add Objects dialog box appears listing "SampleImporter", which is checked by default. Click OK.
In the Component Categories Manager, you can see that "Importer.SampleImporter"
has been added to the list of components in the Metadata Importers category. Click OK.
In ArcCatalog, click a shapefile or another data source in the Catalog tree. Click the Metadata tab
and then click the Import Metadata button on the Metadata toolbar. The custom importer
appears in the Format dropdown list in thhe Import Metadata dialog box.