1

I want to create add-in tool to show x y coordinate on status bar live.

      protected override void OnMouseMove(ESRI.ArcGIS.Desktop.AddIns.Tool.MouseEventArgs arg)
    {

        //this.Enabled = !this.Enabled;
        ArcMap.Application.CurrentTool = null;


        if (ArcMap.Document == null || ArcMap.Document.CurrentLocation == null)
            return;

        var point = ArcMap.Document.CurrentLocation;
        ArcMap.Application.StatusBar.set_Message(0, point.X.ToString() + point.Y.ToString());
    }

but xy are not live. What should i do?

  • 2
    Just to be clear, what do you mean with "status bar"? Could you post a screen shot to show what you want? Whitout knowing the above, why isn't the built-in coordinate display in the lower right corner in Arcmap sufficient? – Martin Jan 5 '17 at 10:00
0

enter image description here

Now,I'm OK. I deleted ArcMap.Application.CurrentTool = null;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.