Error with if-then lisp
Error with if-then lisp
(OP)
Hello,
The lisp I wrote is to plot a file (to disk) depending on whether the drawing is in model space or paper space. It works fine except I get an error after it runs:
; error: no function definition: nil
Can anyone tell me why?
The lisp I wrote is to plot a file (to disk) depending on whether the drawing is in model space or paper space. It works fine except I get an error after it runs:
; error: no function definition: nil
Can anyone tell me why?
RE: Error with if-then lisp
CODE
((command "plot" "yes" "" "CAL File Generator300dpi.pc3" "ARCH D (36.00 x 24.00 Inches)" "inches" "landscape" "no" "extents" "fit" "center" "yes" "BPXA.ctb" "yes" "no" "" "yes" "yes");; then plot ms
);; end then
((command "plot" "yes" "" "CAL File Generator300dpi.pc3" "ARCH D (36.00 x 24.00 Inches)" "inches" "landscape" "no" "extents" "fit" "center" "yes" "BPXA.ctb" "yes" "no" "no" "no" "" "yes" "yes");; else plot ps
);; end else
);; end if
Thanks
RE: Error with if-then lisp
RE: Error with if-then lisp
BTW, here's the entire routine:
CODE
(command "filedia" 0)
(if (= (getvar "tilemode") 1)
((command "plot" "yes" "" "CAL File Generator300dpi.pc3" "ARCH D (36.00 x 24.00 Inches)" "inches" "landscape" "no" "extents" "fit" "center" "yes" "BPXA.ctb" "yes" "no" "" "yes" "yes");; then plot ms
);; end then
((command "plot" "yes" "" "CAL File Generator300dpi.pc3" "ARCH D (36.00 x 24.00 Inches)" "inches" "landscape" "no" "extents" "fit" "center" "yes" "BPXA.ctb" "yes" "no" "no" "no" "" "yes" "yes");; else plot ps
);; end else
);; end if
(command "filedia" 1)
(command "expert" 0)
I just realized that it's not resetting FILEDIA and EXPERT so it must be bombing out before it gets there.
RE: Error with if-then lisp
...this doesn't look good:
((command "plot" etc...
...and...
'else plot ps'
you have that inside parentheses
should be only one parenthesis before the 'command', should have got some error message upon loading?
RE: Error with if-then lisp
BTW, I thought comments were allowed anywhere as long as they were the last thing on that particular line, correct?
Thanks again.
RE: Error with if-then lisp
Comments must be preceded by a semicolon, on the same line as the semicolon.
RE: Error with if-then lisp