Results 1 to 8 of 8

Thread: Total Length of Polylines

  1. #1
    Member
    Join Date
    2003-04
    Location
    Hyderabad,Andhra Pradesh,India
    Posts
    15
    Login to Give a bone
    0

    Default Total Length of Polylines

    Hi,


    I am having seperate polylines in a file.I want to know the total length of these lines with one command.How Can I get it.If anybody help me.We are having so many files.
    We are having these files in DD position.

    Below I am attaching one file for reference.

    Thanks,
    Vijay
    Attached Files Attached Files

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Total Length of Polylines

    Download TLEN.LSP from here.

    If you are not sure what to do with lisp files, see this page
    R.K. McSwain | CAD Panacea |

  3. #3
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Total Length of Polylines

    Quote Originally Posted by vijaybaskergundla View Post
    Hi,


    I am having seperate polylines in a file.I want to know the total length of these lines with one command. . .
    This code works on LWpoly, HeavyPoly and 3dPoly.
    Single select, window select or select All.
    Code:
    (defun c:PolySum ( / SelSet Item SumLength EntName )
      (if (setq SelSet (ssget '((0 . "*POLYLINE" ))))
        (progn
          (vl-load-com)
          (setq Item 0 SumLength 0 )
          (repeat (sslength SelSet )
            (setq EntName (ssname SelSet Item ) )
            (setq SumLength (+ SumLength (vlax-curve-getDistAtParam EntName (vlax-curve-getEndParam EntName ))) )
            (setq Item (1+ Item ) )
          )
          (princ (strcat "\n" (itoa Item ) " polylines, total length = " (rtos SumLength )) )
        )
        (princ "..no POLYLINE selected " )
      )
      (princ)
    )
    : ) Happy Computing !

    kennet

  4. #4
    Active Member
    Join Date
    2007-03
    Posts
    57
    Login to Give a bone
    0

    Default Re: Total Length of Polylines

    Load Alexandr Rivilis GeomProps utility.
    http://www.maestrogroup.com.ua/support/GeomProps.zip
    Type ARX in command line, then Load and pick on GeomProps2006.arx if use Autocad 2006 or GeomProps2007.arx if use Autocad 2007-2009.
    This operation needs to be made once
    After that simply choose objects and in a window of properties look the area, volume, length
    Important!!!

    By virtue of the certain reasons this utility to unload it is impossible: it will lead to crash Autocad.
    Its autostart can be removed and manually from the register. It is a branch:
    HKEY_CURRENT_USER \Software \Autodesk \AutoCAD \R1N.M \ACAD-XXXX:YYY \Applications \GeomProps
    Where N, M, XXXX, YYY - depend on the version and localization AutoCAD

    Original thread in Russian: http://www.caduser.ru/forum/index.ph...D=44&TID=36136
    Last edited by azarko; 2009-06-17 at 03:02 PM.

  5. #5
    Member
    Join Date
    2003-04
    Location
    Hyderabad,Andhra Pradesh,India
    Posts
    15
    Login to Give a bone
    0

    Default Re: Total Length of Polylines

    Thank you very much for given this program.But I want one more help from you.

    Actually this drawings are in "Geographic(Lat/Lon)" position and having "WGS84" datum.
    So I want to know the total length in "Km".Please change this program accordingly.

    Thanks,
    Vijay






    Quote Originally Posted by kennet.sjoberg View Post
    This code works on LWpoly, HeavyPoly and 3dPoly.
    Single select, window select or select All.
    Code:
    (defun c:PolySum ( / SelSet Item SumLength EntName )
      (if (setq SelSet (ssget '((0 . "*POLYLINE" ))))
        (progn
          (vl-load-com)
          (setq Item 0 SumLength 0 )
          (repeat (sslength SelSet )
            (setq EntName (ssname SelSet Item ) )
            (setq SumLength (+ SumLength (vlax-curve-getDistAtParam EntName (vlax-curve-getEndParam EntName ))) )
            (setq Item (1+ Item ) )
          )
          (princ (strcat "\n" (itoa Item ) " polylines, total length = " (rtos SumLength )) )
        )
        (princ "..no POLYLINE selected " )
      )
      (princ)
    )
    : ) Happy Computing !

    kennet

  6. #6
    Member
    Join Date
    2003-04
    Location
    Hyderabad,Andhra Pradesh,India
    Posts
    15
    Login to Give a bone
    0

    Default Re: Total Length of Polylines

    Thank you very much for given this program.But I want one more help from you.

    Actually this drawings are in "Geographic(Lat/Lon)" position and having "WGS84" datum.
    So I want to know the total length in "Km".Please change this program accordingly.

    Thanks,
    Vijay







    Quote Originally Posted by rkmcswain View Post
    Download TLEN.LSP from here.

    If you are not sure what to do with lisp files, see this page

  7. #7
    Woo! Hoo! my 1st post
    Join Date
    2014-07
    Posts
    1
    Login to Give a bone
    0

    Default Re: Total Length of Polylines

    how can i download tlength to my p.C. and use it through autocad 2014?

  8. #8
    Login to Give a bone
    0

    Default Re: Total Length of Polylines

    There's "MeteorSpec" plug-in that calculates the summarized lengths of polylines. Look at Autodesk Exchange apps.

Similar Threads

  1. Polylines: total area and length
    By Wish List System in forum AutoCAD Wish List
    Replies: 6
    Last Post: 2015-05-24, 10:44 AM
  2. Polylines: total area and length
    By Wish List System in forum AutoCAD Wish List
    Replies: 1
    Last Post: 2014-01-29, 05:16 AM
  3. Total length of multiple polylines
    By Wish List System in forum AutoCAD Wish List
    Replies: 2
    Last Post: 2013-12-18, 10:03 PM
  4. Polylines and Total Length
    By revit.wishlist1942 in forum Revit Architecture - Wish List
    Replies: 3
    Last Post: 2012-06-13, 08:10 PM
  5. Get total length of selected Polylines
    By roygoncalves in forum AutoCAD General
    Replies: 4
    Last Post: 2006-11-07, 12:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •