- (defun c:WD (/ ss wd)
- ;; Change width of selected MText and MultiLeader objects
- ;; Alan J. Thompson, 11.05.09
- (if (and (setq ss (ssget "_:L" '((0 . "MTEXT,MULTILEADER"))))
- (setq wd (initget 4)
- wd (cond ((getdist "\nWidth <0.0>: "))
- (0.)
- )
- )
- )
- (progn
- (vlax-for x (setq ss (vla-get-activeselectionset
- (cond (*AcadDoc*)
- ((setq *AcadDoc* (vla-get-activedocument
- (vlax-get-acad-object)
- )
- )
- )
- )
- )
- )
- (vl-catch-all-apply
- (function vlax-put-property)
- (list x
- (cond ((eq (vla-get-objectname x) "AcDbMText") 'Width)
- ((eq (vla-get-objectname x) "AcDbMLeader") 'TextWidth)
- )
- wd
- )
- )
- )
- (vla-delete ss)
- )
- )
- (princ)
- )
|