I have some applications to make and I don't know how to use entlast
I have to draw 2 lines in autocad and in autolisp to make a right-angle triangle using the drawn lines to join them and automatically generate the vertical line.
I made the code just to generate a triangle but I have no idea how to use the previously drawn lines.
Code:
(defun c:desen()
(setq x (getint "x colt stanga jos")) ;5
(setq y (getint "y colt stanga jos")) ;5
(setq x1 0.0)
(setq y1 0.0)
(setq pct1 (list x1 y1))
(setq x2 x)
(setq y2 0.0)
(setq pct2 (list x2 y2))
(setq x3 x)
(setq y3 y)
(setq pct3 (list x3 y3))
(entmake (list(cons 0 "polyline")))
(entmake (list
(cons 0 "vertex")
(cons 10 (list x1 y1 0)))
)
(entmake (list
(cons 0 "vertex")
(cons 10 (list x2 y2 0)))
)
(entmake (list
(cons 0 "vertex")
(cons 10 (list x3 y3 0)))
)
(entmake (list
(cons 0 "vertex")
(cons 10 (list x1 y1 0)))
)
(entmake (list (cons 0 "SEQEND"))
))