ILoveMadoka Posted February 12, 2024 Posted February 12, 2024 (edited) This code by LeeMac works perfectly (modifies the Line Space Factor for MTEXT) [The distance between Multiple Lines - FYI) (defun c:mtlsp ( / i s ) (if (setq s (ssget "_X" '((0 . "MTEXT") (-4 . "<>") (44 . 0.5)))) (repeat (setq i (sslength s)) (entmod (append (entget (ssname s (setq i (1- i)))) '((44 . 0.5)))) ) ) (princ) ) Lee Post I modified it a bit to select only what I wanted vs selecting ALL (defun c:mtlsp ( / s ) (setq s (ssget '((0 . "MTEXT")))) (if s (progn (repeat (setq i (sslength s)) (entmod (append (entget (ssname s (setq i (1- i)))) '((44 . 1.40358)))) ) (princ "\nValue changed successfully.") ) (princ "\nNo MTEXT entities selected.") ) (princ) ) I want to add a step to move each selected MTEXT in the Y direction 0.5. I do not know how to add that into this code... Help please.... Edited February 12, 2024 by ILoveMadoka Quote
Isaac26a Posted February 12, 2024 Posted February 12, 2024 What about this ;;; By Lee Mac with mods by ILoveMadoka (defun c:mtlsp ( / s ) (setq s (ssget '((0 . "MTEXT")))) (if s (progn (vl-cmdf "_.move" s "" "_non" '(0. 0. 0.) "_non" '(0. 0.5 0.)) (repeat (setq i (sslength s)) (entmod (append (entget (ssname s (setq i (1- i)))) '((44 . 1.40358)))) ) (princ "\nValue changed successfully.") ) (princ "\nNo MTEXT entities selected.") ) (princ) ) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.