writing info to text file with autolisp

G.H.

Usenet Archive
Joined
Jul 31, 2003
Messages
3
Reaction score
0
I'm trying to write a drawing path to a text file after using the getfiled function (see below) but i cant figure out how to use the write-line function to write the path in the text file. Any help would be great

(defun c:setup (/ bdr info bdrok pt1)
(setq bdr (getfiled "Select Market Border" "//Theseus/Proj/" "dwg" 8)) (setq info (getfiled "Select Border Information" "//Theseus/Proj/" "dwg" 8)) (setq PT1 "0,0,0") (setq f (open "c:/new.txt" "w")) (write-line (!bdr) fp)--------------this is where im having problems (close f) (do_a1)
)
 
(write-line (!bdr) fp)--------------this is where im having problems

....replace with

(write-line bdr f)

The exclamation syntax is mostly used to show the value of a variable at the AutoCAD command line. The variable used for your file descriptor was "f", not "fp".
I hope that helps.
 

Latest threads

Back
Top