Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

list command (also see IDPOINT>EXCEL)

Status
Not open for further replies.

aesoton

Marine/Ocean
Sep 25, 2002
42
Further to my earlier thread - The list command lists all the coordinates ofa selected object - GREAT - but it also contains lots of other information which is useless to me. How can I delete this easily without having to resort to putting it in notepad and doing it myself?
Thanks in advance
 
Replies continue below

Recommended for you

assuming that you are refering to point entities:
copy the text below the line of askerisks to a text file and save it as PList.lsp, then use appload to load it into AutoCAD. After the program loads, enter plist at the command line. The program writes the point location out to a comma delimited text file that you can open in Excel.
I hope that this helps
**********************************************************
;;PList.lsp - collect all points in drawing and write them to a comma delimited file

(defun C:pLIST (/ POINT_LIST INDEX PFILE);;define function - declare local variables
(setq POINT_LIST(ssget "x" (list '(0 . "POINT"))));;create selection set of all points
(setq INDEX 0)
(setq PFILE (open "PLIST.TXT" "w"));;create file to write to
(repeat (sslength POINT_LIST);;recurse through the selection set
(setq POINT (cdr(assoc 10(entget(ssname POINT_LIST INDEX)))))
(setq X (car POINT)
y (cadr POINT)
Z (caddr POINT)
)
(write-line (strcat (rtos X)","(rtos Y)","(rtos Z)) PFILE)
(setq INDEX (1+ INDEX))
);;end repeat
(close PFILE);;close PLIST.TXT
);;End of function
(prompt "\nType PLIST to execute")
 
Thanks JHubbard,
I have tried it and I get an error - lselsetp nil
what does this mean?
Thanks
Andrew299
 
<lselsetp nil>
This means that the routine didn't find any points. What are the entities that you are trying to list?
List one of the objects, then cut and paste in your reply.
 
Sorry JHubbard but I cannot paste any of the work on the net. What I want to know is - you know those blue boxes that appear when you select an object - how do I get the values of the coordinates of these boxes? without individually selecting and using the ID command on all of them? The model is limited to lines and curves.
Thanks for the program anyway
Andrew
 
Those little blue boxes are grip points.
All the data in the drawing can be extracted and exported to a text file.
Look at the dxf reference in the autocad help file.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor