请各给大侠帮忙看一下,lisp程序加载时总提示 “错误: 输入的列表有缺陷”
(defunc:mcir()(setvar"CMDECHO"0)(setvar"blipmode"0)(setqline(entsel"选取直线:"))(setqline...
(defun c:mcir()
(setvar "CMDECHO" 0)
(setvar "blipmode" 0)
(setq line (entsel "选取直线:"))
(setq line_list (entget (car line)))
(setq A (assoc 10 line_list))
(setq A1 (cdr A))
(setq A1x (car A))
(setq A1y (cadr A))
(setq B (assoc 11 line_list))
(setq B1 (cdr B))
(setq B1x (car B))
(setq B1y (cadr B))
(setq C1x (/ (+ A1x B1x) 2))
(setq C1y (/ (+ A1y B1y) 2))
(setq C (list C1x C1y)
(setp rr (getdist c "请输入半径值:"))
(command "circle" c rr)
(setvar "blipmode" 1)
(prin1)
)
(prompt "**********<<c:mcir>>**********")
(prin1)
在一直线中点画圆 展开
(setvar "CMDECHO" 0)
(setvar "blipmode" 0)
(setq line (entsel "选取直线:"))
(setq line_list (entget (car line)))
(setq A (assoc 10 line_list))
(setq A1 (cdr A))
(setq A1x (car A))
(setq A1y (cadr A))
(setq B (assoc 11 line_list))
(setq B1 (cdr B))
(setq B1x (car B))
(setq B1y (cadr B))
(setq C1x (/ (+ A1x B1x) 2))
(setq C1y (/ (+ A1y B1y) 2))
(setq C (list C1x C1y)
(setp rr (getdist c "请输入半径值:"))
(command "circle" c rr)
(setvar "blipmode" 1)
(prin1)
)
(prompt "**********<<c:mcir>>**********")
(prin1)
在一直线中点画圆 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询