更改圆的半径,lisp程序有什么问题,请高手指教
(defunc:chgrad()(setvar"CMDECHO"0)(setvar"blipmode"0)(setqcc(entsel"选取已知圆:"))(setqcc_...
(defun c:chgrad()
(setvar "CMDECHO" 0)
(setvar "blipmode" 0)
(setq cc (entsel "选取已知圆:"))
(setq cc_list (entget (car cc)))
(setq old_rr_list (assoc 40 cc_list))
(setq old_rr (cdr old_rr_list))
(princ "\n旧半径=") (princ old_rr)
(setq cen_cc (cdr (assoc 10 cc_list)))
(setq new_rr (getdist cen_cc "输入新半径:"))
(setq new_rr_list (cons 40 new_rr))
(setq cc_list (subst new_rr_list old_rr_list))
(entmod cc_list)
(setvar "blipmode" 1)
(prin1)
)
(prompt "**********<<c:pbox>>**********")
(prin1)
错误: 参数太少 展开
(setvar "CMDECHO" 0)
(setvar "blipmode" 0)
(setq cc (entsel "选取已知圆:"))
(setq cc_list (entget (car cc)))
(setq old_rr_list (assoc 40 cc_list))
(setq old_rr (cdr old_rr_list))
(princ "\n旧半径=") (princ old_rr)
(setq cen_cc (cdr (assoc 10 cc_list)))
(setq new_rr (getdist cen_cc "输入新半径:"))
(setq new_rr_list (cons 40 new_rr))
(setq cc_list (subst new_rr_list old_rr_list))
(entmod cc_list)
(setvar "blipmode" 1)
(prin1)
)
(prompt "**********<<c:pbox>>**********")
(prin1)
错误: 参数太少 展开
1个回答
推荐于2016-08-13 · 知道合伙人互联网行家
关注
展开全部
(defun C:cl (/ );
(setvar "cmdecho" 1)
(setq en (ssget (list '(0 . "circle"))))
(setq len 0)
(setq ss (ssname en 0))
(command "lengthen" ss "") ;取图形长度
(setq len (getvar "perimeter"))
(setq p0 (getpoint"起点:")) ;;取起点
(setq x0 (car p0))
(setq y0 (cadr p0))
(setq p1 (list (+ x0 len) y0 ))
(command "LINE" P0 P1 "")
)
(setvar "cmdecho" 1)
(setq en (ssget (list '(0 . "circle"))))
(setq len 0)
(setq ss (ssname en 0))
(command "lengthen" ss "") ;取图形长度
(setq len (getvar "perimeter"))
(setq p0 (getpoint"起点:")) ;;取起点
(setq x0 (car p0))
(setq y0 (cadr p0))
(setq p1 (list (+ x0 len) y0 ))
(command "LINE" P0 P1 "")
)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询