Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Digitise autocad points 2

Status
Not open for further replies.

ashjun

Geotechnical
Jan 17, 2002
83
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
 
Replies continue below

Recommended for you

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)
)
 
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
 
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.
 
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,
 
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 !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor