I want to add up the lengths of multiple poly lines for quantity takeoff. In 2017 and earlier versions there was "POLYQUANTITIES". It added up all of them and exported to excel table for you.
in 2018 they stopped supporting that, did something else replace it? If so what?
Thanks
Solved! Go to Solution.
I want to add up the lengths of multiple poly lines for quantity takeoff. In 2017 and earlier versions there was "POLYQUANTITIES". It added up all of them and exported to excel table for you.
in 2018 they stopped supporting that, did something else replace it? If so what?
Thanks
Solved! Go to Solution.
Solved by Civil3DReminders_com. Go to Solution.
Solved by alique.langlois. Go to Solution.
A quick google found this gem of a result
https://forums.autodesk.com/t5/autocad-map-3d-forum/total-length-of-polylines/td-p/6999996
the Lisp should work.
I also use Tlen.LSP and it works
;|
TLEN.LSP - Total LENgth of selected objects
(c) 1998 Tee Square Graphics
|;
(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)
)
A quick google found this gem of a result
https://forums.autodesk.com/t5/autocad-map-3d-forum/total-length-of-polylines/td-p/6999996
the Lisp should work.
I also use Tlen.LSP and it works
;|
TLEN.LSP - Total LENgth of selected objects
(c) 1998 Tee Square Graphics
|;
(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)
)
Another subject that comes up with some regularity. >Here< is a long thread about it.
Another subject that comes up with some regularity. >Here< is a long thread about it.
Sorry, but there has never been a command in AutoCAD called "POLYQUANTITIES".
Perhaps this was an add-on that you once had installed.
Technically, the DATAEXTRACTION command (part of AutoCAD) can do it (See image below), but it's a huge pain if all you want to do is get a quick total. TLEN.LSP is your best bet (Even Autodesk says so....)
@Civil3DReminders_com - add this to your list too
Sorry, but there has never been a command in AutoCAD called "POLYQUANTITIES".
Perhaps this was an add-on that you once had installed.
Technically, the DATAEXTRACTION command (part of AutoCAD) can do it (See image below), but it's a huge pain if all you want to do is get a quick total. TLEN.LSP is your best bet (Even Autodesk says so....)
@Civil3DReminders_com - add this to your list too
The poster was referring to this addon:
I use DataExtraction since it has all of the features the user is wanting.
The poster was referring to this addon:
I use DataExtraction since it has all of the features the user is wanting.
@Civil3DReminders_com - I figured you would agree that something this simple should be in the core product. I wish they would stop redesigning the icons, and changing color schemes every year and fix things like this.
@Civil3DReminders_com - I figured you would agree that something this simple should be in the core product. I wish they would stop redesigning the icons, and changing color schemes every year and fix things like this.
I'm now afraid of asking for features. I figure Autodesk will take my request and have a workflow to export the polylines to a new export file format, have me import it into Revit, and then open Infraworks to read the Revit file to run the command to create the table in AutoCAD and Excel.
I'm beginning to think there is a betting pool at Autodesk to see how many separate programs they can get their users to use and they started the range of available numbers at 10.
I'm now afraid of asking for features. I figure Autodesk will take my request and have a workflow to export the polylines to a new export file format, have me import it into Revit, and then open Infraworks to read the Revit file to run the command to create the table in AutoCAD and Excel.
I'm beginning to think there is a betting pool at Autodesk to see how many separate programs they can get their users to use and they started the range of available numbers at 10.
I appreciate that the dev team looks at the big picture sometimes. For example, DataExtraction does a LOT more than total polyline lengths. So whatever problem they set out to solve, it probably solved a dozen more. Great.
But sometimes, simplicity is the answer. I see no reason why the PROPERTIES command just can't simply total the length of all selected polylines and display it. They are already doing this for the AREA property of multiple selected HATCH entities.
I appreciate that the dev team looks at the big picture sometimes. For example, DataExtraction does a LOT more than total polyline lengths. So whatever problem they set out to solve, it probably solved a dozen more. Great.
But sometimes, simplicity is the answer. I see no reason why the PROPERTIES command just can't simply total the length of all selected polylines and display it. They are already doing this for the AREA property of multiple selected HATCH entities.
@alique.langlois wrote:
....
I also use Tlen.LSP and it works
I notice that TLEN and some of the routines in the link in my first Reply go to more trouble than necessary. They derive the length of different kinds of objects by different kinds of calculations, or in some cases using an AREA command on them so they can extract the length from the PERIMETER System Variable. Some allow selection of things that don't have length at all, and either just pass them by in processing, or report on their invalidity. But there's a way to disallow those right in the selection, and a single AutoLisp function that can get the length from all eligible object types in the same way, which greatly reduces the code required.
(vl-load-com) ; [if needed]
(defun C:TOTLEN (/ ss n ent tl)
(if (setq ss (ssget '((0 . "LINE,ARC,CIRCLE,*POLYLINE,SPLINE,ELLIPSE"))))
(progn ; then
(repeat (setq n (sslength ss))
(setq
ent (ssname ss (setq n (1- n)))
tl (+ (cond (tl) (0)) (vlax-curve-getDistAtParam ent (vlax-curve-getEndParam ent)))
); setq
); repeat
(alert (strcat "Total length of selected objects is " (rtos tl) "."))
); progn
); if
(princ)
); defun
No, it doesn't do the breakdown reporting or extraction to a file or anything, but is just an improvement on the TLEN command and some of the other approaches.
@alique.langlois wrote:
....
I also use Tlen.LSP and it works
I notice that TLEN and some of the routines in the link in my first Reply go to more trouble than necessary. They derive the length of different kinds of objects by different kinds of calculations, or in some cases using an AREA command on them so they can extract the length from the PERIMETER System Variable. Some allow selection of things that don't have length at all, and either just pass them by in processing, or report on their invalidity. But there's a way to disallow those right in the selection, and a single AutoLisp function that can get the length from all eligible object types in the same way, which greatly reduces the code required.
(vl-load-com) ; [if needed]
(defun C:TOTLEN (/ ss n ent tl)
(if (setq ss (ssget '((0 . "LINE,ARC,CIRCLE,*POLYLINE,SPLINE,ELLIPSE"))))
(progn ; then
(repeat (setq n (sslength ss))
(setq
ent (ssname ss (setq n (1- n)))
tl (+ (cond (tl) (0)) (vlax-curve-getDistAtParam ent (vlax-curve-getEndParam ent)))
); setq
); repeat
(alert (strcat "Total length of selected objects is " (rtos tl) "."))
); progn
); if
(princ)
); defun
No, it doesn't do the breakdown reporting or extraction to a file or anything, but is just an improvement on the TLEN command and some of the other approaches.
All of the links that I have found to LISP routines that total up lines or polyline lengths are dead.
Has AutoDesk created a command for this yet, or am I chasing a rainbow?
All of the links that I have found to LISP routines that total up lines or polyline lengths are dead.
Has AutoDesk created a command for this yet, or am I chasing a rainbow?
@DapperDanMan wrote:
All of the links that I have found to LISP routines that total up lines or polyline lengths are dead.
....
There are two routines in this very topic that do that. Do they not work for you?
@DapperDanMan wrote:
All of the links that I have found to LISP routines that total up lines or polyline lengths are dead.
....
There are two routines in this very topic that do that. Do they not work for you?
I don't know how to program autolisp routines.
I have a masters degree in Architecture, not in computer programming.
There should be a command for this in acad.
I don't know how to program autolisp routines.
I have a masters degree in Architecture, not in computer programming.
There should be a command for this in acad.
@DapperDanMan I don't think your education level should play into this. Nor your sass about your ability and openness to learning.
Open notepad, copy and paste the code, and save-as "***.lsp". Then drag and drop that into the cad window. Now depending on the command name used it should work as everyone describes.
@DapperDanMan I don't think your education level should play into this. Nor your sass about your ability and openness to learning.
Open notepad, copy and paste the code, and save-as "***.lsp". Then drag and drop that into the cad window. Now depending on the command name used it should work as everyone describes.
@DapperDanMan AutocAD is a tool of your trade: learn how to use the tools of your trade like your paying customers expect (and how you expect your electrician/plumber/doctor/nurse/car repair shop to do for example), here are basic instructions that explain how to get started http://www.lee-mac.com/runlisp.html inn addition to the great quick-fix advise provided in message #13 above https://forums.autodesk.com/t5/autocad-forum/length-of-multiple-polyline-totals/m-p/11246279#M108223...
Tools of your trade bud. Tools of your trade.
@DapperDanMan AutocAD is a tool of your trade: learn how to use the tools of your trade like your paying customers expect (and how you expect your electrician/plumber/doctor/nurse/car repair shop to do for example), here are basic instructions that explain how to get started http://www.lee-mac.com/runlisp.html inn addition to the great quick-fix advise provided in message #13 above https://forums.autodesk.com/t5/autocad-forum/length-of-multiple-polyline-totals/m-p/11246279#M108223...
Tools of your trade bud. Tools of your trade.
There are a lot of things that *should* be in AutoCAD, that are not. Nobody is making us use it. There are lots of competitors out there, give them a look. Maybe something else is a better fit.
There are a lot of things that *should* be in AutoCAD, that are not. Nobody is making us use it. There are lots of competitors out there, give them a look. Maybe something else is a better fit.
@DapperDanMan wrote:
All of the links that I have found to LISP routines that total up lines or polyline lengths are dead.
....
I don't know how to program autolisp routines.
I have a masters degree in Architecture, not in computer programming.
There should be a command for this in acad.
If those links has not been dead, you would still have needed to load the AutoLisp routines at them, just as you do those in this topic [or any other(s) you might find].
To suggest that AutoCAD implement such as thing, go to the >Product Feedback Page<. We can't help with that here -- we're all just other Users like you, with minimal oversight by Autodesk employees, who are not the ones who can help with that, either.
@DapperDanMan wrote:
All of the links that I have found to LISP routines that total up lines or polyline lengths are dead.
....
I don't know how to program autolisp routines.
I have a masters degree in Architecture, not in computer programming.
There should be a command for this in acad.
If those links has not been dead, you would still have needed to load the AutoLisp routines at them, just as you do those in this topic [or any other(s) you might find].
To suggest that AutoCAD implement such as thing, go to the >Product Feedback Page<. We can't help with that here -- we're all just other Users like you, with minimal oversight by Autodesk employees, who are not the ones who can help with that, either.
This worked great before I had to switch to 2020 LT ... any workarounds to get TLEN to function in LT? When I copy/paste into command line it keeps trying to open a new file for some reason. And, of course, LT doesn't support use of lisp.. thank you very much for your help!
This worked great before I had to switch to 2020 LT ... any workarounds to get TLEN to function in LT? When I copy/paste into command line it keeps trying to open a new file for some reason. And, of course, LT doesn't support use of lisp.. thank you very much for your help!
@jesseQ2KVW wrote:
.... any workarounds to get TLEN to function in LT? ....
None that I'm aware of, with no AutoLisp capability. Nor is DATAEXTRACTION available in LT. It's the price you pay for the lower price.
@jesseQ2KVW wrote:
.... any workarounds to get TLEN to function in LT? ....
None that I'm aware of, with no AutoLisp capability. Nor is DATAEXTRACTION available in LT. It's the price you pay for the lower price.
@jesseQ2KVW wrote:
This worked great before I had to switch to 2020 LT ...
Explore these for LT users
https://www.cadtutor.net/forum/topic/62309-calculate-a-total-of-lines-length-in-lt/
@jesseQ2KVW wrote:
This worked great before I had to switch to 2020 LT ...
Explore these for LT users
https://www.cadtutor.net/forum/topic/62309-calculate-a-total-of-lines-length-in-lt/
Do you have a lisp routine like this but for area??? I love the face you can select and the total is a pop up notification. I posted something I found a while ago but I don't love it. Thank you!
Do you have a lisp routine like this but for area??? I love the face you can select and the total is a pop up notification. I posted something I found a while ago but I don't love it. Thank you!
Can't find what you're looking for? Ask the community or share your knowledge.