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

Changing all text style including all blocks

7 REPLIES 7
SOLVED
Reply
Message 1 of 8
joe_kohli
479 Views, 7 Replies

Changing all text style including all blocks

Is there a way or a script that can be wrote to convert ALL text (attributed, embedded in blocks, etc.) to a different style? Instead of using BATMAN

7 REPLIES 7
Message 2 of 8
cadffm
in reply to: joe_kohli

Command STANDARDS

Use a file WITHOUT the styles you woun't but with the style you want to merge to.

Sebastian

EESignature

Message 3 of 8
pendean
in reply to: joe_kohli

HELP in the program is a good place to start (yes, you'll need to have 'correct' content already at hand like template files etc.)
https://help.autodesk.com/view/ACD/2025/ENU/?guid=GUID-F8B47FBB-1276-4D74-BA89-0440CB4E4866#:~:text=...
OR
find and use LISP that over the years do at you want or get close to it, like this
https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/set-all-text-to-standard-text-style/...
Message 4 of 8
Kent1Cooper
in reply to: joe_kohli

Would it suffice to change all Style definitions to use the same font [and perhaps also other characteristics like obliquing angle and width factor, possibly even height], rather than change all text-variety objects to the same Style?  You would still have multiple Styles defined, but they would all look the same.  For example, we have this available:

(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.")

 

Kent Cooper, AIA
Message 5 of 8
joe_kohli
in reply to: joe_kohli

Kent, this may actually work. I tried it and it converted every piece of text to Arial in my drawing. To give you a small idea of what I am trying to do: I have hundreds of drawings that were unfortunately drawn under the Romans.shx font and have Romans style. None of these drawings have readable text when using Adobe/Bluebeam. I am in the process of converting them over to readable text. So I'm not so much worried about the style per say as I am about getting the whole drawing into readable text format. This way, the users then can search a database and their search results would pull up whatever drawing had that particular search word in it. To keep it all coherent, I would love to have both style and font changed but I understand if you can't do that. I'm looking for a "STANDARD" style with 0.75 width factor and RomanS_IV25 font.

Message 6 of 8
Kent1Cooper
in reply to: joe_kohli

[I assume you are aware that changing the font will affect things like word wrapping in Mtext, whether Dimension text fits between extension lines, etc.  So it should be followed by a careful look-over to check for things that may need adjustment.]

 

One potential complication with changing all Text and Text-like objects to the same Style, rather than just all Styles to the same font:  Do you ever use Styles with fixed height?  If you use different heights at all, of course any "universal" Style would need to be defined at "zero" height to accommodate that variety.  So anything in Styles that had a fixed height will lose that characteristic, if that matters to you.

Kent Cooper, AIA
Message 7 of 8
joe_kohli
in reply to: joe_kohli

Ya I was looking at some of those issues and I believe I will be fortunate enough to have bypassed those. The script you provided does everything I need it to do (of course with a few tweeks to the code to my liking). Thank Kent! I appreciate your support yet again.

Message 8 of 8
joe_kohli
in reply to: joe_kohli

Kent, you were right. Some of the drawings are being modified through the script but it is negatively affecting certain characters within my drawings. Can the script be changed so that it would perform this execution: Change all font to RomanS_IV25 with a width factor of 0.75, HOWEVER, if the drawing contains this criteria,

 

Text Style: LType

Font Name: Arial Narrow

Font Style: Bold

Width Factor: 1.00

 

DO NOT convert it. Simply ignore this text and keep it at Arial Narrow.

 

 

Here is the lsp I am currently running:

 

(defun C:r25 (/ cmde sty); = All Styles RomanS_IV25 font at 0.75 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 "RomanS_IV25" "" 0.75 "" "" "")
); if
); while
(setvar 'cmdecho cmde)
(princ)
); defun
(prompt "\nType ASA9 to set All Styles to RomanS_IV25 font at 0.75 width factor.")

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

Post to forums  

Forma Design Contest


AutoCAD Beta