关于属性
带属性的块插入时可以指定比例,如何控制属性文字的大小不受比例的影响。但属性文字相对距离,你可有想过????
本帖最后由 作者 于 2002-11-14 13:10:10 编辑;;但属性文字相对距离不受比例的影向<难呀!!>你可有想过????
(defun C:TEST (/ HOLDREQ HOLDECHO IN_NAME IN_PT IN_SCALE ATTS)
(setq HOLDREQ (getvar "attreq"))
(setq HOLDECHO (getvar "cmdecho"))
(setvar "attreq" 0)
(setvar "cmdecho" 0)
(setq IN_NAME (getstring "\n输入图块名称: "))
(setq IN_PT (getpoint "\n插入点: "))
(setq IN_SCALE (getdist "\n图块比例: "))
(command "_insert" IN_NAME IN_PT IN_SCALE "" "")
(setq
ATTS (vlax-safearray->list
(vlax-variant-value
(vla-getattributes (vlax-ename->vla-object (entlast)))
)
)
)
(foreach X ATTS
(vla-put-height X (/ (vla-get-height X) IN_SCALE))
)
(setvar "attreq" HOLDREQ)
(setvar "cmdecho" HOLDECHO)
(princ)
)
页:
[1]