Is there a way to highlight multiple polylines in a drawing and find the total length?
|
Is there a way to highlight multiple polylines in a drawing and find the total length?
Well, technically the ._DataExtraction command can do it, but that involves a lot of work to get there.
You might want to head over to http://www.turvill.com/t2/free_stuff/index.htm and download TLEN.LSP.
If you are not sure what to do with autolisp code, see http://www.cadtutor.net/faq/question...ISP+routine%3F
R.K. McSwain | CAD Panacea |
hmm, downloaded it and got an error when trying it.
R.K. McSwain | CAD Panacea |
After selecting the objects and hitting enter it said " ; error: Function cancelled "
In the event you cannot get TLEN.lsp working, here's a small substitute:
Hope this helps!Code:(defun c:FOO (/ ss) (vl-load-com) (prompt "\n >> Select Multiple Polylines for Total Length: ") (if (setq ss (ssget '((0 . "*POLYLINE")))) ((lambda (i / e l) (while (setq e (ssname ss (setq i (1+ i)))) (setq l (+ (cond (l) ((setq l 0))) (vla-get-length (vlax-ename->vla-object e))))) (prompt (strcat "\n >> Total Length = " (rtos l 2 2)))) -1) (prompt "\n <!> Nothing Selected <!> ")) (princ))
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000
The FOO command didn't work either when loaded.
I appreciate the help though.
Something is wrong then, because I've used TLEN many times, and I just tried FOO and it works fine also.
Are you getting an error when you load the file?
R.K. McSwain | CAD Panacea |
The file seems to load fine. Does the fact that I'm working with CIV 3d 2010 have anything to do with it?
I attached the drawing with the polylines.
Last edited by RenderMan; 2010-10-01 at 02:09 PM. Reason: Typo
"How we think determines what we do, and what we do determines what we get."
Sincpac C3D ~ Autodesk Exchange Apps
Computer Specs:
Dell Precision 3660, Core i9-12900K 5.2GHz, 64GB DDR5 RAM, PCIe 4.0 M.2 SSD (RAID 0), 16GB NVIDIA RTX A4000