AutoCAD 2010.
When I try something like the following:
(setq pt1 (getpoint))
(setq pt2 (getpoint))
(command "VIEW" "W" "MyView" !pt1 !pt2)
..."nil" appears on the command line, and no view is saved. (And it doesn't seem to matter what form of the VIEW command I use.)
However, if I set the two variables, and then use them in the command-line VIEW command, like so:
Command: -view
Enter an option [?/Delete/Orthographic/Restore/Save/sEttings/Window]: w
Enter view name to save: MyView
Specify first corner: !pt1
(9.66774 -0.845631 0.0)
Specify opposite corner: !pt2
(29.8391 8.49791 0.0)
...it works fine.
Can anyone tell me what I'm doing wrong?
Solved! Go to Solution.
Solved by dmfrazier. Go to Solution.
Note to self: you don't need the exclamation point (evaluate the variable) inside the LISP command function.
Thanks to anyone who would have responded.