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 am developing an ArcGIS desktop addin. I am attempting to get the distance units (ft, mm, km, etc.) from a layer in my .mxd and display it on a windows form. How can I do this? I can access the distance units of a map by using IMap.DistanceUnits, but I have had trouble accessing the distance units of an individual layer.

share|improve this question
    
What type of feature are you wanting to measure distance of (point, line, or polygon)? –  artwork21 Apr 8 '13 at 0:52
    
It can be a point, line or polygon layer. I only need the map units that the layer exists in (i.e. whether the layer coordinate system is in ft^2, or m^2, or km^2). I don't need to measure the distance of the features. –  user16921 Apr 8 '13 at 1:35
3  
Did you try IProjectedCoordinateSystem.CoordinateUnit? –  Kirk Kuykendall Apr 8 '13 at 2:16
    
This did the trick! I had to do a bit of casting to get to it, but since I was dealing with the SpatialReference class, which IProjectedCoordinateSystem inherits from, it was no big deal. –  user16921 Apr 8 '13 at 3:50
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.