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

890
2
Jump to solution
10-14-2013 06:55 AM
RonaldFlint
New Contributor
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()?
0 Kudos
1 Solution

Accepted Solutions
JohnStephens
Occasional Contributor
Is this helpful?  It looks like 10.0 has OnUpdate that will do what you are looking for.  I'm not sure if this is different from 10.1 or not.

View solution in original post

0 Kudos
2 Replies
JohnStephens
Occasional Contributor
Is this helpful?  It looks like 10.0 has OnUpdate that will do what you are looking for.  I'm not sure if this is different from 10.1 or not.

View solution in original post

0 Kudos
RonaldFlint
New Contributor
Yes, that helps. I also found this, which will also help. Thank you very much, BelowZero8.
0 Kudos