关于AutoLisp;自定义的函数(defun c:cpoly (x)... 然后在cad里调用(cpoly 8)显示没有此函数,求解释。 20
;;;圆内接多边形(defunc:cpoly()(setvar"cmdecho"0)(setqen(entsel"SelectCircle"))(setqen-data(...
;;;圆内接多边形
(defun c:cpoly ()
(setvar "cmdecho" 0)
(setq en (entsel "Select Circle"))
(setq en-data (entget (car en)))
(setq cenpt (cdr (assoc 10 en-data)))
(setq rr (cdr (assoc 40 en-data)))
(command "polygon" (getint "输入多边形的边数:") cenpt "i" rr)
;(command "polygon" x cenpt "i" rr)
(princ)
)
直接输入有用,可是设置成形参就没用了,
不知道是调用格式不对,还是怎么了? 展开
(defun c:cpoly ()
(setvar "cmdecho" 0)
(setq en (entsel "Select Circle"))
(setq en-data (entget (car en)))
(setq cenpt (cdr (assoc 10 en-data)))
(setq rr (cdr (assoc 40 en-data)))
(command "polygon" (getint "输入多边形的边数:") cenpt "i" rr)
;(command "polygon" x cenpt "i" rr)
(princ)
)
直接输入有用,可是设置成形参就没用了,
不知道是调用格式不对,还是怎么了? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询