<Extension id="Arizona_Geological_Survey_ncgmpToolbar_ncgmpEditorExtension" autoLoad="true" productName="NCGMP Editor" showInExtensionDialog="true" class="ncgmpEditorExtension" />
IEditor theEditor = ArcMap.Editorin the OnStartup() function.
Fundamentally, what is the difference between an Editor Extension and some other extension?
protected override void OnClick()
{
//UID theUID = new UIDClass();
//theUID.Value = ThisAddIn.IDs.ncgmpEditorExtension;
//ncgmpEditorExtension theExt = ArcMap.Application.FindExtensionByCLSID(theUID) as ncgmpEditorExtension;
var theExt = ESRI.ArcGIS.Desktop.AddIns.AddIn.FromID<ncgmpEditorExtension>(ThisAddIn.IDs.ncgmpEditorExtension);
try
{
if (theExt.Enabled == true) { theExt.Enabled = false; }
else { theExt.Enabled = true; }
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
}Editor extensions do not get listed in the Extension Manager dialog since they are managed by the Editor instead. If you implement a regualr extension, the show in extension dialog property will apply.