Hi all - here is what I have so far. I found a Lisp routine that reads a file so I copied it (hope thats not Plagiarism) and cut out the lines that did not pertain to what I was trying to do.
So here we go... (drum roll please...)
; My3Dpoly.LSP
; Written by Garth Druckenmiller on February 20, 2005
; with help from various sources.
(defun C:MY3DPOLY ()
(Prompt "\nMY3DPOLY - Draws a 3Dpolyline by reading input from coordinates file")
(Setq FILENAME (getstring "\nName of coordinate file to input : "))
(Setq FILEUNIT (open FILENAME "r"))
(setq OLD_CMDECHO (getvar "CMDECHO"))
(setvar "CMDECHO" 0)
(setq COUNTER 1)
(While (setq LINE_INPUT (read-line FILEUNIT))
(prompt (strcat "\rProcessing line number : " (itoa COUNTER)))
(setq PT LINE_INPUT)
(command ".3DPOLY" PT "")
(setq COUNTER (1+ COUNTER))
)
(close FILEUNIT)
(setvar "CMDECHO" OLD_CMDECHO)
(prompt " Program complete.")
(princ)
)
sample data...
5713.10,1208.40,40.00
5762.70,1260.90,40.00
5766.40,1262.10,45.00
5934.50,1316.80,45.00
5989.00,1325.10,47.00
6279.70,1365.90,49.00
6284.80,1366.30,36.00
6421.40,1356.00,36.00
6570.60,1347.60,49.00
6771.80,1348.00,49.00
7081.90,1321.20,43.00
7138.80,1367.00,22.00
7226.20,1354.70,21.00
7298.50,1344.80,21.00
7346.10,1319.60,25.00
7454.90,1294.00,30.00
It runs but I don't see anything in AutoCAD. My thinking is that is has something to do with the 3DPOLY command - I have an old AutoLISP book and that command is not in it - Can someone tell me the sintex of that command. Thanks,
Talk with you guys soon,