word height ratio :The outward offset distance of the border is the reciprocal of the proportional value of the current text height.
(xdrx-begin)
(if (not #xd
-var
-offsetx
) (setq #xd
-var
-offsetx
5.0) )
"\nInput offset coefficient (word height ratio) <%0.1f>:"
#xd-var-offsetx
)
)
)
(setq #xd
-var
-offsetx offsetx
) )
"\nSelect text or attribute <Exit>:"
'((0 . "text,attrib"))
)
)
)
(setq box
(xdrx
-entity
-box e
) box (xdrx-points-ucs2wcs box)
txth (xdrx-getpropertyvalue e "textheight")
offsetbox (xdrx-points-offset (/ txth #xd-var-offsetx) box)
randstr (xdrx-string-rand 6)
grpname
(strcat "xd-att-wipeout-grp-" randstr
) )
(setq wipeout
(xdrx
-wipeout
-make offsetbox
)) (setq grp
(xdrx
-group
-make grpname wipeout e
)) (xdrx-draworder->top wipeout)
(if (xdrx
-object
-iskindof e
"AcDbAttribute") (setq blkref
(xdrx
-object
-owner e
)) (xdrx-draworder->top blkref);;Attrib
)
(xdrx-draworder->top e);;Normal Text
)
)
)
(xdrx-end)
)