Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm activating the measure tool through code by using the ControlsMapMeasureToolClass. I want programmmatically to change the default length units of tool. How do do that?

share|improve this question

Built-in commands and windows are generally black boxes that have predefined behaviors and little to no exposed settings.

The built-in Measure Tool appears to use the active data frame's coordinate system to determine which units to display by default. You can of course interactively change the displayed units by clicking the first small black arrow on the Measure tool window:

Changing the Measure tool units interactively

What you could try is changing the focused map's MapUnits property or modifying the map's SpatialReference property before activating the tool. Probably not the most elegant solution, but the only alternative I see is implementing your own Measure tool command/window.

share|improve this answer
thank you very much. – Sarah Oct 30 '11 at 5:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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