Jump to content

change text style


dnovember99

Recommended Posts

so i have drawings that have a lot of different text styles within it, (this was a work provided thing.) and i want to be able to change all the text to the same.

 

without having to go and select similar or click one by one. here is something that i found that seems to work pretty good for me but i am getting a message at the end of the routine asking me questions, i am not seeing this within the text. or i am just blind.

 

(defun C:CTS (/ entities len count ent ent_data ent_name new_style_name)

(command "STYLE" "Standard" "Romans" "" "" "" "" "")
(setq entities (ssget "X" '((0 . "TEXT,MTEXT")))
     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)
Y 
(setq count (+ count 1))
);while
 
(princ)

);defun

 

 

 

here is what is showing up in the command line

 

Command: changestyle
STYLE Enter name of text style or [?] <Standard>: Standard
Existing style. Full font name = Arial
Specify font name or font filename (for SHX) <Arial>: Romans Specify height of text or [Annotative] <0'-4">: Specify width factor <1.000>:

 

and the questions that are being asked:

 

specify obliging angle <0.00>: display text backwards? [yes/no] <no>:
display text upside-down? [yes/no] <no>: vertical? [yes/no] <no>: vertical? [yes/no] <no>:   

 

 

is there something that i am missing here?

Link to comment
Share on other sites

There are many custom lisp routines that will change a text style. Try looking for another one. Maybe you'll have better results.

 

i have been looking and most of the ones that i am seeing are ones that you have to select what you want to change. and i want to have this be a one and done.

 

i am still green with writing lisp routines that i am not sure where to isolate that to add and/or replace that to another lisp. that is why i am asking for a little help to identify that

Link to comment
Share on other sites

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...