×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

list command (also see IDPOINT>EXCEL)

list command (also see IDPOINT>EXCEL)

list command (also see IDPOINT>EXCEL)

(OP)
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

RE: list command (also see IDPOINT>EXCEL)

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")

RE: list command (also see IDPOINT>EXCEL)

(OP)
Thanks JHubbard,
I have tried it and I get an error - lselsetp nil
what does this mean?
Thanks
Andrew299

RE: list command (also see IDPOINT>EXCEL)

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

RE: list command (also see IDPOINT>EXCEL)

(OP)
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

RE: list command (also see IDPOINT>EXCEL)

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.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources