Here is a quick way to turn on the text background to MTEXT. (Note: this routine works with MTEXT only.)
Click here to see how to add Background Text Mask to Dimensions and MLeaders as this routine does not allow for these objects.
here’s how:
- TMASKON <enter> to turn on the text mask
- TMASKOFF <enter> to turn off the text mask
- Select the MTEXT objects
- <enter> when finished selecting
;Maska Mtextu ano/ne - www.cadforum.cz (defun C:TMaskOn (/ ss x ob1) (vl-load-com) (setq ss (ssget '((0 . "MTEXT")))) (if ss (mapcar '(lambda (x) (setq ob1 (vlax-ename->vla-object x)) (if (= (vla-get-backgroundfill ob1) :vlax-false) (vla-put-backgroundfill ob1 :vlax-true) ) ) (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) ) ) (prin1) ) (defun C:TMaskOff (/ ss x ob1) (vl-load-com) (setq ss (ssget '((0 . "MTEXT")))) (if ss (mapcar '(lambda (x) (setq ob1 (vlax-ename->vla-object x)) (if (= (vla-get-backgroundfill ob1) :vlax-true) (vla-put-backgroundfill ob1 :vlax-false) ) ) (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) ) ) (prin1) ) (defun C:TMaskOnOff (/ ss x ob1) (vl-load-com) (setq ss (ssget '((0 . "MTEXT")))) (if ss (mapcar '(lambda (x) (setq ob1 (vlax-ename->vla-object x)) (if (= (vla-get-backgroundfill ob1) :vlax-true) (vla-put-backgroundfill ob1 :vlax-false) (vla-put-backgroundfill ob1 :vlax-true) ) ) (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss))) ) ) (prin1) )














