Results 1 to 7 of 7

Thread: Lisp routine to list line length and line ID

  1. #1
    Member
    Join Date
    2015-10
    Location
    Easton, Maryland
    Posts
    15
    Login to Give a bone
    0

    Cool Lisp routine to list line length and line ID

    I have a drawing with over 6,000 polylines each polyline has an ID, Size, and Material attached to it as Object Data. I need to get a list of each polyline with the ID and the line length. Does anyone know of a routine that does this or one very similar.

    Thanks for any help you can give me.

    Harvey

  2. #2
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Lisp routine to list line length and line ID

    What version of Acad you using? How is the data attached? Is it Xdata? or is it in the Extension Dictionary of the object? Maybe a small drawing, one of two lines, will be helpful to people trying to help. Also how do you want the data exported? Or are you wanting to create a table within Acad?

    Maybe a more specific explaination is in order.

  3. #3
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    277
    Login to Give a bone
    0

    Default Re: Lisp routine to list line length and line ID

    Post here your drawing.

    Quote Originally Posted by hlecates
    I have a drawing with over 6,000 polylines each polyline has an ID,
    Size, and Material attached to it as Object Data. I need to get a list of each polyline with the ID and the line length. Does anyone know of a routine that does this or one very similar.

    Thanks for any help you can give me.

    Harvey

  4. #4
    Member
    Join Date
    2015-10
    Location
    Easton, Maryland
    Posts
    15
    Login to Give a bone
    0

    Default Re: Lisp routine to list line length and line ID

    Tim,

    Drawing attached, currently running Land Desktop 2006, data atached as object data table, data export as txt file, as text in drawing or as a table.

    I appreciate any assistance I can get.

    thanks
    Attached Files Attached Files

  5. #5
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Lisp routine to list line length and line ID

    Select a polyline with this code, and post back what it returns. On my end it returns a proxy object, but on yours it should return something different.
    Code:
    (entget
     (cdr (assoc 360
      (entget
       (cdr (assoc 360
        (entget (car (entsel)))
       ))
      )
     ))
    )

  6. #6
    Member
    Join Date
    2015-10
    Location
    Easton, Maryland
    Posts
    15
    Login to Give a bone
    0

    Default Re: Lisp routine to list line length and line ID

    Thanks Tim but I need to select all lines as a window selection and return the assigned line ID number and the length of the line.

    Harvey

  7. #7
    AUGI Addict
    Join Date
    2005-08
    Posts
    1,043
    Login to Give a bone
    0

    Default Re: Lisp routine to list line length and line ID

    I know, but this will get me the information I need to help you with that. I can't see the correct information as it is now because I don't have the LDD program you have, so I'm kind of helping you blind, and I need you to be my ears. If you run the code I provied, then post back what it displays on the command line, then we can build from there.

Similar Threads

  1. Help with a lisp routine to add a 12" line to this routine
    By Orbytal.edge341183 in forum AutoLISP
    Replies: 3
    Last Post: 2012-11-14, 10:33 PM
  2. Get length list of line-entitys (arc)
    By cadplayer in forum AutoLISP
    Replies: 8
    Last Post: 2012-01-27, 07:27 AM
  3. Line Length to Materials List
    By surber in forum AutoCAD General
    Replies: 1
    Last Post: 2007-06-19, 01:08 PM
  4. Use LENGTHEN command to list Line length
    By dzatto in forum AutoCAD Tips & Tricks
    Replies: 2
    Last Post: 2007-01-02, 03:54 PM
  5. Zero length line created when lisp is run
    By tommy.malone in forum AutoLISP
    Replies: 8
    Last Post: 2005-06-01, 05:49 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
  •