AnsweredAssumed Answered

CommandBars.Find not working in 10.2.1.3497

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

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,
comm
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

Thanks

Fra

Outcomes