Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.