How can I find the Editor extension in an ArcGIS Engine application (i.e. no access to the IApplication object)?

There is an example method at http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000004nn000000 ...

private void GetEditorExtension(IApplication application)
    //Find extension by CLSID or ProgId.
    UID extensionID = new UIDClass();
    extensionID.Value = "esriEditor.Editor"; 
    IExtension editExtension = application.FindExtensionByCLSID(extensionID);

However, IApplication is only available for code that runs directly in ArcMap, not stand-alone apps.

If it helps, I'm writing this inside a custom tool, so I also have acces to the HookHelperClass.

2 Answers 2


The editor class is an arcmap extension, and is not available with standalone (arcengine) applications.

For ArcEngine try using the EngineEditor singleton class. According to this sample, you can use "new" to get a reference to it. Note that in other situations Esri advises to use activator for instantiation of singletons, but I guess that doesn't apply in this case(?).

It is unfortunate that EngineEditor doesn't implement IExtensionManager. The Editor coclass implements this to support Editor Extensions. Maybe you could write EngineEditor extensions by leveraging the ExtensionManager singleton, which is available in ArcEngine.

If you don't want to hardwire your EngineEditor Extensions you might consider using ICategoryFactory to scan through a category for UID's of registered EngineExtensions, or better yet, store the extensions' assemblies in the geodatabase. After instantiating each extension, call IExtension.Startup and pass a reference to the IEngineEditor. This gives the extension an opportunity to subscribe to IEngineEditEvents, and intercept CRUD operations before they complete so you can enforce business rules.

  • I'm a little confused, if it is not available in arcengine applications, what does all of the IExtensionManager & ICategoryFactory stuff do? P.S. The main point of this question was to get closer to replicating feature templates (gis.stackexchange.com/questions/13371).
    – Keith G
    Aug 11, 2011 at 15:41
  • Feature templates are managed via the IEditor3 on the Editor coclass. The EngineEditor class does not implement it. Since you don't have access to the source code you would not be able to change the EngineEditor so that it implements some interface that exposes templates. Instead, I suggest you could do this by extending the EngineEditor. Since there is no out of the box extension mechanism for EngineEditor you would need to roll your own, perhaps by leveraging the ExtensionManager singleton. You'd still need to roll your own architecture. Aug 11, 2011 at 16:47
  • Also, I'd be surprised if IEditTemplate.Tool could be set to a tool in ArcEngine. I suspect you'll need to roll your own implementation of IEditTemplate, even though the EditTemplate coclass is said to be available in arcengine. Aug 11, 2011 at 16:49
  • OK. Thanks. That's more work than I want to do. I was hoping to leverage the built-in feature editing mechanism (place, drag, delete) so I didn't have to roll my own. Rolling my own tool sounds easier than what you've described.
    – Keith G
    Aug 11, 2011 at 16:57

There is no Editor Extension in ArcGIS Engine.

Take a look at ArcGIS Engine Editing in the Resource Center for some details about how to edit in Engine. I found it to be a great starting point. That, plus all the subtopics, got me from knowing almost nothing about editing via Engine to realizing how much is done for us in ArcMap and how much we have to write ourselves (topology editing, specific tools, etc.) if we need to use Engine.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.