I'm looking for a LSP routine that can add polyline and or line/arc lengths together. I'm trying to get quantities and this project is taking forever using the properties and calculator in autocad. If there is one out there that does this similar to autocad's AREA>OBJECT>ADD that would be FANTASTIC! Please help!
Solved! Go to Solution.
Solved by Jeff_M. Go to Solution.
Solved by gccdaemon. Go to Solution.
TLEN.lsp from http://www.turvill.com/t2/free_stuff/index.htm is one that's been around a while.
I found something a little better to use and made some modifications. Instead of using an alert I dropped it into prompts so I can CTRL+C from the command line.
(defun C:TL (/ ss tl ent) (setq ss (ssget '((0 . "LINE,ARC,CIRCLE,*POLYLINE,SPLINE,ELLIPSE"))) tl 0 ); end setq (repeat (sslength ss) (setq ent (ssname ss 0) tl (+ tl (vlax-curve-getDistAtParam ent (vlax-curve-getEndParam ent)) ); end + & tl ); end setq (ssdel ent ss) ); end repeat (prompt "Total length: ") (prompt (rtos tl)) (princ) ); end defun
Now, is there a routine that is similar to to distance command but cumulatively adds the distance? lol.
Draw Polyline
List
Erase Polyline
**** Edit to add, that that may come off as sarcastic but it's actually a better method. It allows you to visualize your measured path, and grip edit it to adjust it without having to re-trace.
Here is my situation, so that you understand better what I'm looking for. We've got to get a linear foot total for striping. Our striping is created from solids not polylines, because it cleans up better at edge of pavement than a global width polyline, and it's easier to use in our complex dynamic blocks. My problem is that I have to do approximately 20 distance commands per road intersection and manually add those numbers together. Not a problem if I've got a few intersections, but with miles of downtown road consisting of over 100 intersections it becomes very time consuming and cumbersome. Instead of hitting DI 2,000 times and having to add the values manually, I need something that will add continuously. I'd Create something myself if I knew enuff to do it.
When you say "Solids" you're not refering to actual 3D Solids, are you? Just want to be clear.
Also, in this case, wouldn't what I suggested above be more practical then the distance command? Just drawing a polyline and listing it?
If I'm still off base, do a PNGOUT and show us what you're dealing with.
Solids = 2D solids created from [^C^C._Solid] command.
I need to add the lengths in red. The crosswalk stripes are 8' long default, so they're not included because i can multiply.
I think Jeff's comment will do what i need in the short time. I was trying to do mapcgadist and it wasn't loading.
Now that I see what you're after, mapquery would do it too. If your red lines are on their own layer, query by layer and report the length to a CSV. Then, just sum the length column.
You could also use QTO tools that are built into Civil 3D to find your linear totals.
Peter Funk
Autodesk, Inc.
Not to bring this up again, just a detailed description of what I was talking about with MapQuery is here:
http://forums.autodesk.com/t5/AutoCAD-Civil-3D/Extract-Text-to-csv-or-similar/m-p/2947208#M147743
In this case, rather than adding the .STRING parameter, you would simply add the .LENGTH parameter to the report.
....or could you use Data Extraction tools?????
neilyj (No connection with Autodesk other than using the products in the real world)
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
I'm late to game here but DATEXTRACTION is perfect for this. You can even build in formulas for conversions and or cost calculations.
I have not experimented with it yet but the new QTO tools should also tabulate for you
I need something that work in Basic AutoCAD as well. It's mostly for Engineers/EIT's to pull quantities faster. This project is NOT a civil 3D project. I need a routine that is similar to AeccCgADist but works in layouts and uses current units, not a preset. Is there anyone out there who can do this?
DATAEXTRACTION wizard is native acad tool. the beauti of this is: if your standards are good you can set it up once and use it over and over
Then I'd suggest you're in the wrong forum. Autocad is here: http://forums.autodesk.com/t5/AutoCAD-2011/bd-p/407
Larger user base there.