Help with mtext fill color control
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Heelo,
I have a little lisp I use to toggle background off and on in multileaders and mtext.
Is there a way to make this lisp set the Background fill color to "drawing background color"
as part of the toggle on process?
Right now it uses random fill color settings?
See below...
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun C:toGMask( / ss e cnt dxf_ent)
(prompt "\nSelect objects to toggle background mask: ")
(if (setq ss (ssget '((0 . "MULTILEADER,MTEXT"))))
(progn
(repeat (setq cnt (sslength ss))
(setq e (ssname ss (setq cnt (1- cnt))))
(if (eq "MTEXT" (cdr (assoc 0 (entget e))))
(progn
(setpropertyvalue e "BackgroundFill" (abs (1- (getpropertyvalue e "BackgroundFill"))))
(setpropertyvalue e "UseBackgroundColor" (abs (1- (getpropertyvalue e "UseBackgroundColor"))))
);progn
(setpropertyvalue e "MText/BackgroundFill" (abs (1- (getpropertyvalue e "MText/BackgroundFill"))))
);if
);repeat
(command "_.REGEN")
(prompt "\nBackground Masks have been Toggled.")
);progn
;else
(prompt "\nMust select either a Multileader or MText.")
);if
(command "._draworder" ss "" "front")
(setq ss nil)
(princ)
);end defun toGMask
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
thank you in advance for any assistance received.