Implementing the IObjectInspector Class Extension Interface


Implementing a class extension is an ideal way to extend the default geodatabase behavior. By implementing the IObjectInspector interface you can customize the way information is displayed about your feature in the editors property inspector window. In this sample we will create a simple object inspector that demonstrates how a user defined component can be used to display information about a feature. In this example we have modeled a simple database composed of valves, mains and laterals. The property inspector that we have built will be used to display information about what type of valve is used.

How to use:
  1. Open and view the database design using Visio Enterprise (ObjectInspector_UML.vsd) or Adobe Acrobat (Visio-ObjectInspector_UML.pdf).
  2. View the source code to see how the class extension was implemented.
  3. Run the batch file called '_INSTALL.bat' to register the dll and it's appropriate component category.
  4. In Arcmap open the 'data' personal geodatabase and add all of the feature classes.
  5. In Arcmap start the editor, select a few features and using the 'Attributes' button on the far right of the editor menu inspect some of the valve features.
  6. Notice how the Attributes are displayed for different types of valves.


Difficulty: Intermediate

Visual Basic
File Description
ObjectInspector_UML.vsd Visio Enterprise UML Database design.
Visio-ObjectInspector_UML.pdf Adobe Acrobat version of UML Database design.
data.mdb Sample geodatabase dataset.
databaseSamples.vbp Visual Basic project that implements this sample.
CObjectInspector.cls Object Inspector implementation.
_INSTALL.bat Installation script that installs dll.

Key Interfaces: IClassExtension, IFeatureClassExtension, IObjectInspector