哪位高手帮忙给看看这个关于填充的lisp
本帖最后由 wjnnan 于 2015-11-4 12:24 编辑各位好,我写了一个关于修改填充图案比例的lisp,程序运行成功,但是cad中图形的填充图形没有更新,哪位帮忙给看看啊
;修改填充图案比例
(defun C:gtb (/ hpsc ss ent old_hatchbl new_hatchbl)
(setvar "cmdecho" 0)
(setq hpsc (getvar "hpscale"))
(princ "\n请选择填充图案")
(setq ss (ssget '((0 . "hatch"))) )
(setq ent (entget (entlast)))
(setq old_hatchbl (cdr (assoc 41 ent)))
(princ "\n改变填充图案的比例:")
(setq new_hatchbl (getreal (strcat "\n请输入填充图案的比例 <""当前比例" (rtos old_hatchbl 2 0)">:")))
(if (= new_hatchbl nil) (setq new_hatchbl old_hatchbl))
(entmod (subst (cons 41 new_hatchbl) (assoc 41 ent) ent))
(setvar "hpscale" hpsc)
(princ)
);end defun
页:
[1]