If you're talking about Matching one target Mtext to the source in everything [including background mask] except the target's Rotation, in simplest terms:
(defun C:MPMTnoR ; = Match Properties of MText except Rotation
(/ source target targetR)
(setq
source (car (entsel "\nSource Mtext for Properties to Match: "))
target (car (entsel "\nTarget Mtext to get Properties but keep its Rotation: "))
targetR (getpropertyvalue target "Rotation")
); setq
(command "_.matchprop" source target "")
(setpropertyvalue target "Rotation" targetR)
(prin1)
)
If more than one target, each potentially with its own Rotation:
(defun C:MPMTnoR ; = Match Properties of MText except Rotation
(/ source targets n target targetR)
(if
(and
(setq source (car (entsel "\nSource Mtext for Properties to Match: ")))
(member '(0 . "MTEXT") (entget source))
(setq targets (ssget "_:L" '((0 . "MTEXT"))))
); and
(repeat (setq n (sslength targets)); then
(setq
target (ssname targets (setq n (1- n)))
targetR (getpropertyvalue target "Rotation")
); setq
(command "_.matchprop" source target "")
(setpropertyvalue target "Rotation" targetR)
); repeat
); if
(prin1)
)
which has the difference from regular MATCHPROP that it doesn't change the properties of each target one as you select it [if you pick one by one], but waits until you make the entire selection [by whatever mode(s)] before processing them.
The second one's a little less simple than the first, in limiting selection to the right kind of objects, but both could use the other usual enhancements.
Kent Cooper, AIA