For one thing, the entity type is "MULTILEADER" [not "MLEADER"]. And you may as well put the entity type filter right in the (ssget) function, rather than find everything in the window and then filter out the right kinds of things. And you have an extraneous ' in the SCALETEXT command. But that command doesn't accept Mleaders, so you need to do it differently. It could apply SCALETEXT to Text and Mtext and something else to Mleaders, but since you're doing it around whatever the Existing insertion point is, it may as well use a way that can be applied to any of them. Oddly, the entity data entry for height is different for Mleaders than it is for Text/Mtext. Try this:
(defun C:TEST (/ ss tent tdata tml)
(if (setq ss (ssget "_W" '(49130 -49590) '(387222 166237) '((0 . "TEXT,MTEXT,MULTILEADER"))))
(repeat (setq n (sslength ss)); then
(setq
tent (ssname ss (setq n (1- n)))
tdata (entget tent)
tml (= (cdr (assoc 0 tdata)) "MULTILEADER"); text is in a MLeader [T or nil]
); setq
(entmod
(subst
(cons (if tml 41 40) 100);<-- EDIT [replace 100 with desired height]
(assoc (if tml 41 40) tdata)
tdata
); subst
); entmod
); repeat
); if
(princ)
); defun
I used the 100 height in your original Message, not the 80 in your "after" drawing.
Kent Cooper, AIA