Tuesday, April 20, 2010

ESRI ArcObjects IObjectInspector

Working on an Object Inspector extension for Landfile project. Having some difficulty, it doesn't appear that it is easy to handle the editing of features through a custom extension.

Here are the steps to implement.

01. Implement IObjectInspector, IClassExtension, and IFeatureClassExtension in your custom inspector form.

02. In the code for the Inspect method, use the user32 SetParent and ShowWindow methods to set the parent of the default inspector to your custom window and show the window. This was a little tricky because of the syntax of SetParent, and the architecture of ArcMap. The correct usage (finally!) was:

SetParent(DefaultObjectInspector,CustomObjectInspector)
ShowWindow(CustomObjectInspector)

03. Build the project and register the type with regasm.

04. Set the Class Extension using ArcObjects IFeatureWorkspaceSchemaEdit AlterClassExtensionCLSID method, passing the CLSID of your custom extension.

05.

No comments:

Post a Comment