MeasureLineDistance

    > what is the distance (total length) of the selected lines? (using ArcMap)

     

     

    Answers

    First two answers below cribbed from http://forums.esri.com/Thread.asp?c=93&f=982&t=144395&mc=6

     

    Manually

    With shapefiles you have to calculate the length by adding a new field then calculating the length in that field - this is then not maintained by the file, if you make adjustments you will have to recalculate the field - a geodatbase feature class will do this for you. -- Harry Stagg
    From the ArcGIS Desktop Help, length, calculating for lines in the Index.

     

  • Click Editor on the Editor toolbar and click Start Editing. You can make calculations without being in an editing session; however, in that case, there is no way to undo the results.
  • Right-click the shapefile layer you want to edit and click Open Attribute Table.
  • Right-click the field heading for length and click Calculate Values. If there is no field for length values, you can add a new field for length by clicking the Options button and selecting Add Field. However, to add a new field, you need to exit the editing session.
  • Click Calculate Values.
  • Check Advanced.
  • Type the following VBA statement in the first text box:
    Dim dblLength as double
    Dim pCurve as ICurve
    Set pCurve = [shape]
    dblLength = pCurve.Length
  • Type the variable dblLength in the text box directly under the length field name.
  • Click OK.
  • Tip: The property length returns a field type of double. For best results, your length field should also be a double field type.

     

    via Developer Tools

    there is also an ArcObjects? developer Measure Tasks tool to do this:

     

    " This sample allows you to measure the distance between locations using the sketch tool. The functionality in this example mimics the functionality of the Measure Tool, but it has the added advantage of the Editor's snapping environment. Use this edit task when you want to snap to the locations you are measuring from."

     

     

    Discussion

    ...snide comments about yet another missing "meat & potatoes" operation from a multi-thousand dollar GIS tool, almost but not quite refrained from being said

     

     

     

     

     

     

    WebForm
    TopicCategory HowTo

     

     

        Send feedback