I have a lisp from original author, LEEMAC on CADTutor...
I recoded it and used DOSLib.
Here is the code:
Code: Select all
(defun c:rscr (/ wfile rfile ofile n)
(if (and (setq wfile "C:\\test.scr")
(setq rfile (dos_getfilem "Select Drawings"
"" "DWG Files (*.dwg)|*.dwg"))
)
(progn
(setq ofile (open wfile "w"))
(foreach n
'(write-line
(strcat "open \"" rfile "\" (load \"mylsip.lsp\") (c:mylisp) close \"Y\"")
ofile))
(close ofile)
(command "script" wfile))
(princ "\n<!> File Selection Error <!>"))
(princ))
Can someone help me please..
I think its wrong with foreach and write-line functions...