View Full Version : Total Length of Polylines
vijaybaskergundla
2008-11-06, 10:10 AM
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
rkmcswain
2008-11-06, 12:24 PM
Download TLEN.LSP from here (http://www.turvill.com/t2/free_stuff/index.htm).
If you are not sure what to do with lisp files, see this page (http://www.cadtutor.net/faq/questions/28/How+do+I+use+an+AutoLISP+routine%3F)
kennet.sjoberg
2008-11-06, 08:20 PM
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.
(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
azarko
2008-11-10, 07:52 AM
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.php?PAGE_NAME=read&FID=44&TID=36136
http://keep4u.ru/imgs/b/081110/92/92b42b79a0057c4524.jpg
vijaybaskergundla
2008-11-11, 03:21 AM
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
This code works on LWpoly, HeavyPoly and 3dPoly.
Single select, window select or select All.
(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
vijaybaskergundla
2008-11-11, 03:23 AM
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
Download TLEN.LSP from here (http://www.turvill.com/t2/free_stuff/index.htm).
If you are not sure what to do with lisp files, see this page (http://www.cadtutor.net/faq/questions/28/How+do+I+use+an+AutoLISP+routine%3F)
hossam.el.agamy675987
2014-07-04, 05:01 AM
how can i download tlength to my p.C. and use it through autocad 2014?
alexjuhanson699493
2015-04-30, 04:29 PM
There's "MeteorSpec" plug-in that calculates the summarized lengths of polylines. Look at Autodesk Exchange apps. https://apps.exchange.autodesk.com/ACD/en/Detail/Index?id=appstore.exchange.autodesk.com:meteorspectrial_windows32and64:en
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.