Community
AutoCAD Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Text and dimension style instant conversion in one click

2 REPLIES 2
Reply
Message 1 of 3
vicktor1111111
361 Views, 2 Replies

Text and dimension style instant conversion in one click

Hi!

Suppose I receive a drawing with lots of texts and dimensions having style which doesn't match the regulations. I need to convert them all in one click by going to the text style editor, choosing there the style used everywhere in the drawing and changing there the font name and font style for it. Similar procedure I perpetrate with the dimension style.

After that only the the text which isn't an mtext changes it's font though. The dimensions aren't being affected at all. Now, as a workaround I select all the mtexts, using the filter command, and explode them, thus converting them from mtext to text. That makes most of them change the font as well, but still some of them retain the original font. In order them to change the font either, I need to click each of them to edit them, and as soon as the editing mode is turned on they change the font either. Same goes for dimensions, but they must be exploded to where they're just sets of lines and texts, and all of the dimensions must be clicked to editing mode to change their font, no matter whether they're texts or mtexts.

Now here is the question, is there any way to convert the font of all the texts and dimensions instantly without those clicking and entering the editing mode of all of them, and desirably without exploding dimensions and mtexts into texts?

Thank you!

Labels (4)
2 REPLIES 2
Message 2 of 3
pendean
in reply to: vicktor1111111

>>>... style which doesn't match the regulations....<<<
CHECKSTANDARDS command is how you fix non-complaint files to meet your project standards https://www.youtube.com/watch?v=J7QmY8-6ZR0

HTH
Message 3 of 3

For Dimensions, you should be able to do it in the Dimension Style definitions [change the Text Style assigned to them], rather than dealing with individual Dimension objects [and therefor without Exploding anything].

 

If the font should be the same in all Text Styles, including all those assigned to all Dimension Styles, you can do something like this [adjust the font name and width factor to your taste, and if you want an .shx font, add another "" at the end of the Style command for the vertical question that is not asked about .ttf fonts]:

 

 

(defun C:ASA9 (/ cmde sty); = All Styles Arial font at 0.9 width factor
  (setq cmde (getvar 'cmdecho))
  (setvar 'cmdecho 0)
  (while (setq sty (cdr (assoc 2 (tblnext "style" (not sty)))))
    (if (not (wcmatch sty "*|*")); not in an Xref
      (command "_.style" sty "Arial" "" 0.9 "" "" "")
    ); if
  ); while
  (setvar 'cmdecho cmde)
  (princ)
); defun
(prompt "\nType ASA9 to set All Styles to Arial font at 0.9 width factor.")

 

 

For us, that works on all Mtext [except with any internal  font override(s)], and for all Dimensions.  The one thing it doesn't do, for some reason, is to correct already-drawn  plain Text.  That can be handled by selecting it, changing its Style to anything else [without a fixed height], and changing it back again.  If you have different Styles involved and any have fixed heights, do it with QSELECT and fix one Style's-worth of Text objects at a time.

Kent Cooper, AIA

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report