Hello and thanks for helping me out. I'm kinda liking this LISP stuff!!
I added a few more things to it and looking at some other code from CAB to in corporate into it.
Take a look and see what you think. Also, I like to set a static path so I don't have to keep searching for the directory that I placed the ".txt" files to read. Secondly, is there a way to turn off the OSNAP's (I thought it would be (Setvar "OSNAP" 0) but its not working)
;; My3Dpoly.LSP
;; Written by Garth Druckenmiller on February 20, 2005
;; Updated on 02/23/2005 - read multiple coordinate files.
;;
;; with help from various sources. Thanks to those on TheSwamp.org
(defun C:MY3DPOLY ()
(Prompt "\nMY3DPOLY - Draws a 3Dpolyline by reading input from coordinates file(s)")
(Prompt "\n")
(setq OLD_CMDECHO (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(setq FILENAME "")
(while (Setq FILENAME (getfiled "Select the coordiate file to input : " FILENAME "txt" 128))
(Setq FILEUNIT (open FILENAME "r"))
(command ".3DPOLY")
;; process file
(While (setq LINE_INPUT (read-line FILEUNIT))
(setq PT LINE_INPUT)
(command PT)
)
(command "")
(close FILEUNIT)
)
(setvar "CMDECHO" OLD_CMDECHO)
(prompt "\nProgram complete.")
(princ)
)
All look at your code Peter at some point - its a little over my head at this point, but thanks for sharing.
Thanks again for all your help.