lack Point Tool to MapControl

420
1
11-23-2013 04:58 AM
FilippaFideria
New Contributor
Hi forum
I have a problem with MapControl object.
I have developed an application with c# language and arcgis engine.
I have imported a toolbar developed for ArcMap desktop in a MapControl but some function developed for toolbar desktop don't work.
The follow function doesn't work but throws an exception at row of IDocument:
    
   private void SelectBlackPointTool()
        {
            try
            {
                IDocument ipDoc;
                ICommandBars ipCommandBars;
                ICommandItem ipCommandItem;
                UID ipUID = new UIDClass();
                ipDoc = m_application.Document as IDocument;
                ipCommandBars = ipDoc.CommandBars;
                ipUID.Value = "esriArcMapUI.SelectTool";
                ipCommandItem = ipCommandBars.Find(ipUID, false, false);
                m_application.CurrentTool = ipCommandItem;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

What can I change to correct the function in order to make it works?

Please help me!
Please!

Thanks in advance
0 Kudos
1 Reply
BrentHoskisson
Occasional Contributor III
Can you give us the error message.  Have you done the license binding before this code?
0 Kudos