+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Full Member sailor's Avatar
    Using
    AutoCAD 2002
    Join Date
    Feb 2007
    Posts
    46

    Default measuring length of lines automatically

    Registered forum members do not see this ad.

    Hi All,

    I wanna measure automatically the total length of lines,circles,etc. which are on the model. Is there a command or script for this??? Thanks

  2. #2
    Full Member sailor's Avatar
    Using
    AutoCAD 2002
    Join Date
    Feb 2007
    Posts
    46

    Default

    To be clear what I meant is the periphery of a circle,thanks....

  3. #3
    Super Member
    Using
    AutoCAD not applicable
    Join Date
    Jul 2007
    Posts
    639

    Default

    have you had a look at these

    (sorry broken link)

    If none of these suit , just give us a shout..

    periphery of a circle....circumference
    Last edited by PS_Port; 8th Jun 2008 at 02:10 pm.
    If at first you don't succeed, then maybe failure is more your style.

  4. #4
    Super Member chrisdarmanin's Avatar
    Using
    AutoCAD 2009
    Join Date
    Feb 2006
    Location
    Malta
    Posts
    524

    Default

    here's a lisp that i did not create
    Code:
    ;|
    
    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)
    )
    Quote by George (AWDC Malta President) about Land Rovers:
    "Trid ittiha xebgħa mazza ta' bla raġuni"
    Translation: You have to attack it with a mallet for no reason at all"

  5. #5
    Super Member GE13579's Avatar
    Computer Details
    GE13579's Computer Details
    Operating System:
    Windows XP
    Computer:
    Fujitso Siemens
    RAM:
    3.4Ghz
    Monitor:
    Samsung 19" TFT
    Using
    Mechanical 2009
    Join Date
    Feb 2007
    Location
    North East England
    Posts
    1,454

    Default

    PSPort- your link is broken...

    Chris, TLEN is the answer I would have suggested to your first post, but your second post just asks about the circumference? Then you just need to highlight the circle and look in PROPERTIES.
    "To alcohol; the cause and solution to all of life's problems." - Homer Simpson

  6. #6
    Full Member
    Using
    AutoCAD 2004
    Join Date
    Nov 2008
    Posts
    32

    Default

    Registered forum members do not see this ad.

    Dear all this is my first post on the forum.
    Little about me; I am good with excel and VBA, but very much new to Lisp. I have with me Tlen and LA lisp commands. Both are working very well.
    Can any body help me to join both of these. By this I may be able to find the length of a closed body as well as the enclosed area at the same time. It should be written in the region itself.
    Last edited by vipulgos; 18th Nov 2008 at 03:15 pm.

Similar Threads

  1. Measuring Wavy lines
    By Sideon in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 6
    Last Post: 4th Dec 2010, 06:59 pm
  2. Total length of lines in Acad LT
    By dacoba in forum AutoCAD 2D Drafting, Object Properties & Interface
    Replies: 5
    Last Post: 26th Mar 2008, 06:52 pm
  3. Adding up length of lines
    By Siberian in forum AutoCAD Drawing Management & Output
    Replies: 2
    Last Post: 27th Dec 2006, 08:06 pm
  4. Total length of specific lines
    By Yamma in forum AutoCAD General
    Replies: 1
    Last Post: 21st Aug 2006, 01:11 pm
  5. Lines won't let me specify their length
    By Strix in forum AutoCAD Drawing Management & Output
    Replies: 13
    Last Post: 30th Nov 2005, 01:29 pm

Bookmarks

Posting Permissions

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