Late in the game I know, I did however just hit this issue and resolved it by using onDemand="0" instead of onDemand="false"
Protected Overrides Sub OnUpdate() Me.Enabled = My.ArcMap.Editor.EditState <> ESRI.ArcGIS.Editor.esriEditState.esriStateNotEditing End Sub
onDemand="false />
onDemand="false" />
<AddIn language="CLR" library="MPA_SPARC.dll" namespace="MPA_SPARC"> <ArcMap> <Commands> <Button id="Biogeography_Branch_MPA_SPARC_btnAnalyze" class="btnAnalyze" message="Start the main Analysis tool" caption="Analyze" tip="Analyze" category="Biogeography Branch Add-In Controls" image="Images\btnAnalyze.png" onDemand="false" />
Public Class btnAnalyze Inherits ESRI.ArcGIS.Desktop.AddIns.Button Public Sub New() End Sub Protected Overrides Sub OnClick() //the click task End Sub Protected Overrides Sub OnUpdate() Dim KeyExist As Boolean KeyExist = (My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Biogeography Branch\SPARC", "MPA", Nothing) IsNot Nothing) And (My.Computer.Registry.GetValue("HKEY_CURRENT_USER\SOFTWARE\Biogeography Branch\SPARC", "Resources", Nothing) IsNot Nothing) Enabled = (My.ArcMap.Application IsNot Nothing) And KeyExist End Sub End Class
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.