(defun C:PLOTIT ()
...
(command "-plot" "Yes" (getvar "CTAB") "DWG To PDF.pc3" "ISO A1
(594.00 x 841.00 MM)" "M" "L" "Y" "E" "1:1" "Center" "Y"
"monochrome.ctb" "Y" "N" "N" "N" plotname "Y" "Y")
...
)
(defun C:MAKEPLOT ( )
;;; creates scriptfile
(open "scriptfile" "w")
(write-line "(load \"C:\\\\PLOTIT.lsp\")" "scriptfile")
(write-line "PLOTIT" "scriptfile")
...
...
(close "scriptfile")
;;; runs scriptfile
(command "script" "scriptfile")
)
When I load and run MAKEPLOT it works perfectly!
Now, what I want to avoid is repeating (write-line "(load \"C:\\\
\PLOTIT.lsp\")" "scriptfile") in my scriptfile and move the PLOTIT
subroutine into the host file MAKEPLOT, like this:
(defun C:MAKEPLOT ( )
(defun PLOTIT ()
...
(command "-plot" "Yes" (getvar "CTAB") "DWG To PDF.pc3" "ISO A1
(594.00 x 841.00 MM)" "M" "L" "Y" "E" "1:1" "Center" "Y"
"monochrome.ctb" "Y" "N" "N" "N" plotname "Y" "Y")
...
)
;;; creates scriptfile
(open "scriptfile" "w")
;;; (write-line "(load \"C:\\\\PLOTIT.lsp\")" "scriptfile")
(write-line "PLOTIT" "scriptfile")
...
...
(close "scriptfile")
;;; runs scriptfile
(command "script" "scriptfile")
)
It works but only on the first drawing and after this stops with the
meassge 'PLOTIT' unkown command.
Any idea how to workaround the problem?
Regards
Maq