fuqua Posted June 17, 2009 Posted June 17, 2009 is there a way in autocad 2009, to select all the lines on a certain layer and have autocad sum up the total lenght of those lines on that layer ? Quote
phobos Posted June 17, 2009 Posted June 17, 2009 I have a lisp for that but I don't remember where I had got it. (defun C:TLEN (/ ss tl n ent itm obj l) (setq ss (ssget) tl 0 n (1- (sslength ss))) (while (>= n 0) (setq ent (entget (setq itm (ssname ss n))) obj (cdr (assoc 0 ent)) l (cond ((= obj "LINE") (distance (cdr (assoc 10 ent))(cdr (assoc 11 ent)))) ((= obj "ARC") (* (cdr (assoc 40 ent)) (if (minusp (setq l (- (cdr (assoc 51 ent)) (cdr (assoc 50 ent))))) (+ pi pi l) l))) ((or (= obj "CIRCLE")(= obj "SPLINE")(= obj "POLYLINE") (= obj "LWPOLYLINE")(= obj "ELLIPSE")) (command "_.area" "_o" itm) (getvar "perimeter")) (T 0)) tl (+ tl l) n (1- n))) (alert (strcat "Total length of selected objects is " (rtos tl))) (princ) ) Edit: someone has to change selectionset on code for selecting by layer. 1 Quote
fuqua Posted June 17, 2009 Author Posted June 17, 2009 ah thats great mate, now i need to step up a bit. what i now need is a way, for it to auto select all poly lines within a cluster and measure the total lenght in that selected cluster. (something like microstations "Fan" its called i believe.) Quote
fuqua Posted June 17, 2009 Author Posted June 17, 2009 Thread moved in the AutoLisp forum. thank you Quote
VVA Posted June 17, 2009 Posted June 17, 2009 I use 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. Now adds arx for AutoCad 2010 x86&x64 Critical remarks: This operation needs to be made onceAfter 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 Quote
VVA Posted June 17, 2009 Posted June 17, 2009 I have a lisp for that but I don't remember where I had got it. May be here Total Length of Polylines Quote
Lee Mac Posted June 17, 2009 Posted June 17, 2009 I use 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. Now adds arx for AutoCad 2010 x86&x64 Critical remarks: Original thread in Russian: http://www.caduser.ru/forum/index.php?PAGE_NAME=read&FID=44&TID=36136 Very nice VVA ~ I've gotta learn some ARX or C++... Quote
fuqua Posted June 17, 2009 Author Posted June 17, 2009 I use 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. Now adds arx for AutoCad 2010 x86&x64 Critical remarks: Original thread in Russian: http://www.caduser.ru/forum/index.php?PAGE_NAME=read&FID=44&TID=36136 am i understanding you well ? does this program create a border and then calculates the lenght of all plines within those borders ? despite if a pline crosses the made border ? if so that be great ! Quote
VVA Posted June 18, 2009 Posted June 18, 2009 This program calculates length, the area and volume of the allocated objects and displays data on a bookmark of properties. It is necessary to allocate simply the necessary objects and to look on a bookmark of properties their length. Arx it is necessary to load once and further it is loaded automatically. Any commands to cause it is not necessary, it is necessary only for those or with a different way to allocate interesting objects Quote
fuqua Posted June 18, 2009 Author Posted June 18, 2009 This program calculates length, the area and volume of the allocated objects and displays data on a bookmark of properties. It is necessary to allocate simply the necessary objects and to look on a bookmark of properties their length.Arx it is necessary to load once and further it is loaded automatically. Any commands to cause it is not necessary, it is necessary only for those or with a different way to allocate interesting objects hmm ok ill go give this a try then. thanx alot mate Quote
fuqua Posted June 19, 2009 Author Posted June 19, 2009 just gave this a run and its great, it actually gives a "extra" menu within the properties screen showing the total lenght of all lines selected. 1 thing i dont quite understand is what is being measured with "Area total" ? if i select a line which is 10.60 long it also says area total = 6.0281 !? Quote
Lee Mac Posted July 1, 2009 Posted July 1, 2009 Or see here: http://www.cadtutor.net/forum/showthread.php?t=37508 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.