关于autolisp的问题
怎样用autolisp命令绘制一个三角形,打开后自动生成一个三角形 AUTOLISP是什么软件?楼主想要的
(defun sanjiao()(setq p0(list 0 0))
(setq p1(list (car p0) (+(cadr p0) 5)))
(setq p2(list (+ (car p0) 5) (cadr p0)))
(command "line" p0 p1 p2 "c")
) 对上面的说明,你必须先加载,然后在cad下输入"sanjiao".这样才ok了 (defun c:sanjiaoxing()
(setq os (getvar "osmode"))
(setvar "osmode" 0)
(setq p1 (getpoint "输入第1点:"))
(setq p2(getpoint "输入第2点:"))
(setq p3 (getpoint "输入第3点:"))
(setvar "osmode" os)
(command "pline" p1 p2 p3 "c")
)
页:
[1]