But I tried to combine this lisp with ObjectDBX Wrapper. but can not because of function requirements.
The following should be compatible with my ObjectDBX Wrapper:
(defun attwidth ( doc / bnm tag wid )
(setq bnm "*" ;; Block Filter
tag "*" ;; Tag Filter
wid 0.5 ;; Width Factor
bnm (strcase bnm)
tag (strcase tag)
)
(vlax-for blk (vla-get-blocks doc)
(if (or (= :vlax-true (vla-get-islayout blk)) (wcmatch (strcase (vla-get-name blk)) bnm))
(vlax-for obj blk
(cond
( (= "AcDbAttributeDefinition" (vla-get-objectname obj))
(if (wcmatch (strcase (vla-get-tagstring obj)) tag)
(vla-put-scalefactor obj wid)
)
)
( (and (= "AcDbBlockReference" (vla-get-objectname obj))
(= :vlax-true (vla-get-hasattributes obj))
(wcmatch (strcase (vla-get-effectivename obj)) bnm)
)
(foreach att (vlax-invoke obj 'getattributes)
(if (wcmatch (strcase (vla-get-tagstring att)) tag)
(vla-put-scalefactor att wid)
)
)
)
)
)
)
)
(princ)
)
For use in the active document:
(attwidth (vla-get-activedocument (vlax-get-acad-object)))
For use with my ObjectDBX Wrapper function:
(LM:odbx 'attwidth nil t)