matching text style

matching text style

Anonymous
Not applicable
444 Views
2 Replies
Message 1 of 3

matching text style

Anonymous
Not applicable

dear all,anyone can upload me 1 lisp for matching text property

i have one drawing there are many text style . i want to change that one into 1 style

thanks & regards

0 Likes
445 Views
2 Replies
Replies (2)
Message 2 of 3

Kent1Cooper
Consultant
Consultant

Use QSELECT to select all Text entities, and change their Style in the Properties box, and likewise with all Mtext entities.

Kent Cooper, AIA
0 Likes
Message 3 of 3

Anonymous
Not applicable

 The  below works very well for me 

 

It's set to Standard as is, but you can easlily change lines 3 & 15 to suit your needs

 

 

(defun C:CHANGESTYLE4 (/ entities len count ent ent_data ent_name new_style_name)
 0
(command "STYLE" "STANDARD" "ARIAL.TTF" "0" "1" "0" "N" "N")
(setq entities (ssget '((0 . "TEXT,MTEXT,attdef")))
      len      (sslength entities)
      count 0
);setq 
 
(while (< count len)
       (setq ent      (ssname entities count) 
             ent_data (entget ent)
             ent_name (cdr (assoc 7 ent_data))
       );setq
 
(setq new_style_name (cons 7 "STANDARD"))
(setq ent_data (subst new_style_name (assoc 7 ent_data) ent_data))
(entmod ent_data)
 
(setq count (+ count 1))
);while
 
(princ)
 
);defun

 

0 Likes