private void SetBitmap() { try { ESRI.ArcGIS.esriSystem.UID pUID = new ESRI.ArcGIS.esriSystem.UIDClass(); ESRI.ArcGIS.Framework.ICommandItem pCmdItem; pUID.Value = "{b87d4f92-6d39-4675-a0b5-553b15342ae1}"; // //8E8F4C7F-ACA7-11D2-9F19-00C04F6BC979 pCmdItem = m_application.Document.CommandBars.Find(pUID); //get builtin command item //set my tool's bitmap using Bitmap of the retrieved command item. this.m_bitmap = pCmdItem.FaceID as Bitmap; //base.m_bitmap = pCmdItem.FaceID as Bitmap; //I get the error at below line since FaceID value is null. this.UpdateBitmap(pCmdItem.FaceID as Bitmap); } catch (Exception ex) { } }
Solved! Go to Solution.