Hello everybody,
I am trying to write my first lisp program and I was hoping to get a little assistance. This code I mostly pieced together from an Autolisp book; Autolisp in Plain English.Anyways, I modified it slightly, the hope being that you pick two points and give an offset. The program SHOULD hopefully draw two parallel lines @ the given offset from the line that would result from the two points given. When I load and run the following code I get the error: Too Few Arguments. I'm not sure where another argument should be supplied. Any help I could get would be greatly appreciated.
Thanks,
Matt
(defun dtr (b)
(* pi (/ b 180.0))
)
;
(defun C:mitre (/pnt1 pnt2 pnt3 pnt4 pnt5 pnt6 a d1)
(graphscr)
(setq pnt1 (getpoint "\nSelect First Point: "))
(setq pnt2 (getpoint "\nSelect Second Point: "))
(setq d1 (getdist "\nEnter Offset: "))
(setq a (angle pnt1 pnt2))
(setq pnt3 (polar pnt1 (- a (dtr 90)) d1))
(setq pnt4 (polar pnt2 (- a (dtr 90)) d1))
(setq pnt5 (polar pnt1 (+ a (dtr 90)) d1))
(setq pnt6 (polar pnt2 (+ a (dtr 90)) d1))
(command "line" pnt3 pnt4 "")
(command "line" pnt5 pnt6 "")
)
;
<edit: code tags added>