Originally Posted by
lance.81922
Brad -- You need to learn how to step through your program with the debugger. Your initial error is in your DTR function. AutoLISP knows pi as PI -- not as #p or #P. Fix that and then continue. If you don't know how to step through, go to the VisualLISP window, pick the Debug menu, and click on Stop Once. Then go ahead and load your program and watch what happens.
I changed the #p or P# to be PI the the lisp. When debugging it gets hung up @ the following areas .
Code:
;;define DEGREE to RADIAN function
(defun DTR (X) (/ (* X PI) 180.0) ;_MULTIPLY THE DGR ING BY PI AND DIVIDE IT BY 180
) ;_end dtr
and this area:
Code:
(defun calculus ()
(setq ang-arch 24)
(setq #ang-arch (dtr ang-arch))
(setq #ang-arch/2 (/ #ang-arch 2))
(setq left-ang (+ PI90 #ang-arch/2))
(setq right-ang (- PI90 #ang-arch/2))
;;(4C-cal)
;;(3c-cal)
) ;_end defun (calculus)
Why is the PI causing ti hang up?
Thank you,
Brad