我找到了一个LSP可以帮我:
- (defun c:att_width(/ att_en width_x ed)
- (setq att_en (car (nentsel "\nSelect attribute to change \n")))
- (setq ed (entget att_en))
- (if (= (cdr(assoc 0 ed)) "ATTRIB")
- (progn
- (setq width_x (getreal "\nEnter width factor \n"))
- (setq ed (subst (cons 41 width_x ) (assoc 41 ed) ed ))
- (entmod ed)
- (entupd att_en)
- (princ)
- )
- (princ "\nEntity is not an attribute ")
- )
- (princ)
- )
遗憾的是,这个lisp的设计要求用户交互选择一个属性,这是一个通过脚本部署的繁琐过程(我更喜欢按名称选择一个块)
我的块名是“MRM”(标题块),有一个属性的标签名是“DATE-5”,我特别关注这个属性。如果我可以在“DATE-1”、“DATE-2”上应用相同的宽度因子变化,那就更好了,同时“DATE-5”。
谢谢 |