Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Addition of multiple polyline

  1. #1
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Question Addition of multiple polyline

    Is there a way to highlight multiple polylines in a drawing and find the total length?

  2. #2
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Addition of multiple polyline

    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 |

  3. #3
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Question Re: Addition of multiple polyline

    hmm, downloaded it and got an error when trying it.

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Addition of multiple polyline

    What did the error say?
    R.K. McSwain | CAD Panacea |

  5. #5
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Default Re: Addition of multiple polyline

    After selecting the objects and hitting enter it said " ; error: Function cancelled "

  6. #6
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Addition of multiple polyline

    Quote Originally Posted by William.Gares View Post
    Is there a way to highlight multiple polylines in a drawing and find the total length?
    In the event you cannot get TLEN.lsp working, here's a small substitute:

    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))
    Hope this helps!
    "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

  7. #7
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Default Re: Addition of multiple polyline

    The FOO command didn't work either when loaded.

    I appreciate the help though.

  8. #8
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,805
    Login to Give a bone
    0

    Default Re: Addition of multiple polyline

    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 |

  9. #9
    Active Member
    Join Date
    2009-11
    Posts
    51
    Login to Give a bone
    0

    Question Re: Addition of multiple polyline

    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.
    Attached Files Attached Files

  10. #10
    Administrator BlackBox's Avatar
    Join Date
    2009-11
    Posts
    5,719
    Login to Give a bone
    0

    Default Re: Addition of multiple polyline

    Quote Originally Posted by William.Gares View Post
    Does the fact that I'm working with CIV 3d 2010 have anything to do with it?
    With regard to my post, it *shouldn't* as I used C3D 2011 to write and test that code from home yesterday.
    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

Page 1 of 2 12 LastLast

Similar Threads

  1. Multiple Subtraction or Addition
    By souvik.gis643461 in forum AutoLISP
    Replies: 1
    Last Post: 2014-05-08, 01:52 PM
  2. Polyline Edit - Add multiple vertexes
    By roundbox52 in forum ACA Wish List
    Replies: 2
    Last Post: 2011-03-01, 11:57 PM
  3. single polyline & multiple linetype
    By lalit_jangid in forum AutoCAD Mechanical - General
    Replies: 3
    Last Post: 2009-06-01, 07:44 PM
  4. polyline edit - multiple
    By stuwenk in forum AutoCAD Civil 3D - General
    Replies: 1
    Last Post: 2008-06-18, 04:00 PM
  5. Acquiring Area from multiple Polyline
    By AKraft in forum AutoCAD General
    Replies: 2
    Last Post: 2007-01-02, 10:46 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •