k8nadeau
25.02.2009, 20:53
I am trying to create a lisp program that will find the quarter point of a vertical line in order to draw a new line horizontally to represent welded wire fabric.
This is what I have. Everything works except the command line, which will not draw the line correctly.
(defun c:test()
(setq Pt1 (getpoint "\nSelect bottom point of line:"))
(setq X (car Pt1))
(setq Y1 (cadr Pt1))
(setq Pt2 (getpoint "\nSelect top point of line:"))
(setq Y2 (cadr Pt2))
(setq D (/(- Y2 Y1)4))
(setq DRL (+ D Y1))
(command "line" X DRL)
)
If anyone has any ideas, please don't hesitate. Thanks!
This is what I have. Everything works except the command line, which will not draw the line correctly.
(defun c:test()
(setq Pt1 (getpoint "\nSelect bottom point of line:"))
(setq X (car Pt1))
(setq Y1 (cadr Pt1))
(setq Pt2 (getpoint "\nSelect top point of line:"))
(setq Y2 (cadr Pt2))
(setq D (/(- Y2 Y1)4))
(setq DRL (+ D Y1))
(command "line" X DRL)
)
If anyone has any ideas, please don't hesitate. Thanks!