tflaherty
2005-05-03, 03:44 PM
I'm working on a stair routine and I'm trying to figure out how to get AutoCAD to draw a line perpendicular to a user supplied rotation angle. This is what I've got so far, but I keep getting the error message listed below.
defun straight (/ sp rt)
(setq sp (getpoint "\nSelect point of 1st riser: "))
(setq rt (getangle "\nSelect rotation of stairs: "))
(setq ws (getdist "\nWidth of stairs: "))
(command "line" sp (strcat "@" (rtos ws) "<" (+ (angtos rt) 90)) "")
(princ)
)
error: bad argument type: numberp: "90"
defun straight (/ sp rt)
(setq sp (getpoint "\nSelect point of 1st riser: "))
(setq rt (getangle "\nSelect rotation of stairs: "))
(setq ws (getdist "\nWidth of stairs: "))
(command "line" sp (strcat "@" (rtos ws) "<" (+ (angtos rt) 90)) "")
(princ)
)
error: bad argument type: numberp: "90"