AnsweredAssumed Answered

When is ESRI.ArcGis.ADF.BaseClasses.BaseCommand.OnCreate() called?

Question asked by ronaldeflint on Oct 14, 2013
Latest reply on Oct 14, 2013 by ronaldeflint
I have inherited some source code written a while back by Esri for the company I consult for. This was written using ArcObjects APIs for 9.3. I have converted the project to a Visual Studio 2010 project and changed the references to use 10.1 APIs.

Currently I am converting things over to Add-Ins and have noticed that the tools inherit from ESRI.ArcGIS.ADF.BaseClasses.BaseCommand and thus implement OnCreate(). These tools are disabled when the editor is off and check whether to become enabled when the editor is started. This is done in the OnCreate() method which, I assume, is called automatically by ArcMap every time the editor is started because it's not called elsewhere in the code.

Is this the case?

There doesn't seem to be any similar method available in Add-In components. Is there something similar I could use, or is the only work around to write my own public method that the EditorExtension calls every time at OnStartEditing()?

Outcomes