AnsweredAssumed Answered

CommandBars.Find not working in

Question asked by Francesco.Sinergis on Mar 19, 2014
Latest reply on Mar 20, 2014 by Francesco.Sinergis

I have created a simple ArcMap AddIn, Framework .Net 3.5, with a single button in it.

The click method is this one:

protected override void OnClick() {     try     {         UID commandID = new UIDClass();         commandID.Value = "esriArcMapUI.ZoomToSelectedCommand";          ICommandItem comm = ArcMap.Application.Document.CommandBars.Find(commandID.Value);           if(comm != null)              comm.Execute();     }     catch     {     } }

The problem is,
is always null, no matter wich button i search or if i use the guid instead, nothing is returned

Anyone with the same problem, and hopefully, a solution?

This code was working up to 10.1