Jump to content

Recommended Posts

Posted

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!

 

 

Posted (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 by myloveflyer
Posted
(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”

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...