×
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

Digitise autocad points
2

Digitise autocad points

Digitise autocad points

(OP)
Hi,
Can someone help me to digitise autocad points in some output file (say .dat)
I ahve been using "locate point", but it only prints the coordinate on the screen. How would I be able to export the points shown on the command line.

thanks

RE: Digitise autocad points

Try this lisp routine:

(princ "\nType PTF to start")
(defun c:ptf ()
   (setq Outfilename (getfiled "File Name for point data" "" "dat" 5))
   (setq f1 (open Outfilename "w"))
   (princ "\nSelect points to write to file: ")
   (while
     (setq PickPoint (getpoint "\nNext point: "))
     (setq xval (rtos (car PickPoint) 2 4)
             yval (rtos (cadr PickPoint) 2 4)
             zval (rtos (caddr PickPoint) 2 4)
             PtString (strcat xval "," yval "," zval)
       )
       (write-line PtString f1)
   );while
   (close f1)
   (princ)
)

RE: Digitise autocad points

(OP)
Thanks CarlB..I am still naive in this; guess I will have to understand lisp first before I can incorporate this.
Thanks once again!
Regards

RE: Digitise autocad points

More options:

You could copy and paste from the F2 text window .

You could try "LIST"ing the points and then copy and paste.

You could do a DXFOUT for those points and then read the DXF file.

To use CarlB's lisp routine, copy and paste it into Notepad, then save it as "PTF.lsp" to your C:\ folder (quote marks are needed).  Now in Autocad, load it from the Tools menu or type (Load"C:/PTF).  Now type PTF and see what happens.

RE: Digitise autocad points

(OP)
IFR; thanks a zillion. Got it using all the methods. From this discussion, I have developed interest in lisp. Would you recommend a book with which I can begin with?
tks,

RE: Digitise autocad points

ashjun -
I learned from doing, AutoCAD's built-in help, old AutoCAD manuals that had extended sections on LISP but mostly from looking at other people's code (Cadalyst, Cadence, www) and code that came with AutoCAD.  A lot of "Oh - THAT'S how they do that"!!!  I also had problems that prompted me to experiment and learn.  LISP is a lot like BASIC and I grew up with BASIC so it was an easy transition.  I find DIESEL useful for some things, LISP for others, VBA for more complicated stuff and VB6 for the hard stuff.  There's gotta be lots of books out there, any one with a list of the commands and their syntax with a few examples and a good index is all you really need.  Read one of the CAD magazines, download the LISP stuff and see what it does.

Have fun !!!

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