View Full Version : Lisp routine to list line length and line ID
hlecates
2007-03-20, 05:18 PM
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
T.Willey
2007-03-20, 05:46 PM
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.
Adesu
2007-03-21, 01:55 AM
Post here your drawing.
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
hlecates
2007-03-21, 02:57 PM
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
T.Willey
2007-03-21, 05:18 PM
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.
(entget
(cdr (assoc 360
(entget
(cdr (assoc 360
(entget (car (entsel)))
))
)
))
)
hlecates
2007-03-21, 05:24 PM
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
T.Willey
2007-03-21, 06:03 PM
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.
vBulletin® v3.6.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.