masterfal Posted May 30, 2019 Posted May 30, 2019 I'm looking for a routine which can change the text style for all text (dtext / mtext / dimensions / multileaders) to a specified style - including text inside blocks. Any help much appreciated! Quote
myloveflyer Posted May 30, 2019 Posted May 30, 2019 (edited) (defun c:tt () (setq i 0) (setq ss (ssget '((-4 . "<OR") (0 . "MTEXT") (0 . "TEXT") (-4 . "OR>") ) ) ) (repeat (sslength ss) (vla-put-StyleName (vlax-ename->vla-object (ssname ss i) ) "standard" ) (setq i (1+ i)) ) ) Single-line and multi-line text style modification. Edited May 30, 2019 by myloveflyer Quote
myloveflyer Posted May 30, 2019 Posted May 30, 2019 (defun C:Change_Att_Style (/ ent ent1) (command "undo" "be") (setvar "cmdecho" 0) (setq str (getstring "\nNew_Text_Style:")) (if (setq SS (ssget "X" '((0 . "INSERT") (66 . 1)))) (progn (setq I -1) (repeat (sslength SS) (setq ENT (entget (ssname SS (setq I (1+ I)))) ENT1 ENT ) (while (= (cdr (assoc 0 (setq ENT1 (entget (entnext (cdr (assoc -1 ENT1))))) ) ) "ATTRIB" ) (setq ENT1 (subst (cons 7 str) (assoc 7 ENT1) ENT1)) (entmod ENT1) (entmod ENT) ) ) ) ) (command "undo" "e") (prin1) ) The text style of the property block!You can combine two programs using “cond” Quote
tombu Posted May 31, 2019 Posted May 31, 2019 Merge text styles (or change text styles) by T.Willey is the ultimate dialog box lisp for merging, changing or modifying text styles for all text (dtext / mtext / dimensions / multileaders). I'm currently using version 4.2, but I've used many previous versions over the years without issue. https://www.theswamp.org/index.php?topic=17659.0 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.