Protected Overrides Sub OnUpdate()
'Enabled = My.ArcMap.Application IsNot Nothing
If TypeOf pMxDoc.ActiveView Is ESRI.ArcGIS.Carto.IPageLayout Then
Enabled = False
ElseIf TypeOf pMxDoc.ActiveView Is ESRI.ArcGIS.Carto.IMap Then
Enabled = True
End If
End Sub
<ArcMap>
<Commands>
<Tool id="YOUR-TOOL-ID" onDemand="false" class="YOUR-CLASS" message="..." caption="..." tip="..." category="YOUR-CATEGORY" image="..." />
</Commands>
I am doing the same task. My tool still not working. What do you mean with "OnDemand tag in Config.esriaddinx file"?