7

Is there a shortcut or an extension to ArcMap 10 that would allow me to quickly copy (to clipboard) the coordinates at the current map position/click?

I could implement such a functionality easily enough. However, I'm hoping someone has already done so.


Apparently the code is much simpler than I figured:

IPoint pt = ArcMap.Document.CurrentLocation;
Clipboard.SetData(DataFormats.StringFormat, pt.X + " " + pt.Y);

2 Answers 2

3

Implementing mouse down event when user clicks on map using ArcObjects shows you how to get xy coordinate values.

You can then assign the x and y values to the clipboard.

1
  • Thanks @artwork21, I implemented it as a custom button this morning and added a keyboard shortcut to it. I'll post the code. Commented Oct 21, 2011 at 14:16
1

You did not specify whether you just wanted to do this through the ArcMap GUI. If that is the case just use the Identify tool to point at a location. As well as returning features found you will see a Location bar which can be copy/pasted from.

1
  • My goal was to hover over any location on the map and with a single key press copy the current map coordinates. I'm aware of identify + copy coordinates, but that's too many steps. Thanks for the answer though, may help someone else in the future. Commented Oct 21, 2011 at 14:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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