• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

change the global font to your multiline

  • Thread starter Thread starter brizzo1982
  • Start date Start date

brizzo1982

Guest
Good morning, everyone.
I am in the condition of having to change the text style of hundreds of writings in a drawing: Unfortunately all the writings have the local editing of the font in the text formatting menu.

I tried to create a new text style with the font I intend to use, and then use the command "correspondence with property" to change the properties of all the writings, but it does not work. :mad:

are there methods to achieve the above?
I hope I was clear in the description!:rolleyes:

Thank you! :finger:

I forgot: use autocad 2008. Thank you!
 
I would not have created a new style, I would have changed the font directly in the style you were interested in, to the rescue (if I don't remember bad) you would have had all the writings agg.te with the new font.
I would later have renamed the interested style with the name that + garbava me.
I'm in a hurry and I'm tired, maybe I'm writing 1 stupid...
Hi.
 
thank you number 1 for the interest. Unfortunately the method you mentioned does not work, as all the writings have locally modified the font in the text formatting menu.
I have hundreds of writings in the text style "style 1", with default arial font, but edit loca of fonts in txt.
I want to adopt for all the writings the font romans, it is therefore useless that changes in the text style the font, autocad would not accept it because for the writings it deals with changes Local.

waiting for more information work on other.. .
It would serve in my opinion a macro, a script, a lisp... ask for lumi! !

Thank you!
 
test this lisp discovered by towers, launched with mtextcf It restores the font of mtext to the style, after which it is also "pennellable".


; ; mtextcf program. lsp (c) 12.4. 1999 jan basketky
; ; ; ===============================================================
; ; mtextcleanformat - remove formattani from mtext
; ; modification to kites plus modifications, 24.1.2001 cad studio
; ;

(defun mtextcf0 (txr / position delka character ntx) ; own function performed, prevadi txr na ntx
; (Prince txr)
(setq ntx ")
(setq position 1)
(setq delka (strlen txr))
(while (<= delka position)
(setq character (substr txr position 1))
(if (= character "\\") ; if is a break
(progn
(setq position (1+ position)) ; Move to another character
(setq character (substr txr position 1))
(if (or (= character "{") (= character "}) (= character "\\") (= character "p")); was a second straw or a component. A lock? (or p - repair: vm 31.7.2001)
(setq ntx (strcat ntx "\\" character)) ; yes -> the resulting copy character
(progn; no -> ignoring characters az to ';'
(while (and/= character ");") (<= position delka))
(setq positions (1+ positions))
(setq character (substr txr position 1))
)
)
)
)
(if (and (/= character "{") (/= character "})) ; If it's not a breaker... and it's not even a locker.
(setq ntx (strcat ntx character)) ; so I just copy the input
)
)
(setq positions (1+ positions))
)
(setq ntx ntx)
)


; ; ; ===============================================================
; ; mtextcleanformat - remove formattani from mtext
; ;
(defun c:mtextcf (/ ss1 cnt en txr ntx)
(setq ss1 (ssget '-[-4 . "<or")(0 "dimension")(-4="" "mtext")(0="" "or="" .="">'))) ; select mtexts and dimes
(if (null ss1); Anything?
(progn
(Prince "You didn't choose the back mtext)
(quit)
)
)

(setq cnt 0)
(repeat (sslength ss1); cycle pres select number
(setq en (entget (ssname ss1 cnt))) ; The entity
(setq txr (cdr (assoc 1 en))) ; Preparing text
(setq ntx (mtextcf0 txr)) I'll do my own conversion.
(if (/= txr ntx) ; if the text has changed
(entmod (subst (cons 1 ntx) (assoc 1 en) en))) ; - > I'll replace it in the development database
)
(setq cnt (1+cnt)) ; Move to another entity
)
(Prince)
)

; ; end of file</or")(0>
 
Thank you so much!! it was just what I needed! It works great... :finger:
you have a coffee paid down at the bar...:smile:
Thank you again.

soon
 
The gp lisp is perfect.

there is also another way (but more complex and therefore less efficient)

launch the old ddmodify and select the mtext
in the "contents" section will appear a string like {\fabsalom|b0|i0|c2|p2;....
the prila part of the point and comma is the change of the local text style (in this case font abdsalom).
copy that part and launches chtxext by replacing the text "{\fabsalom|b0|i0|c2|p2;" with nothing.

the result obtained is the same as the gp lisp
if instead of asalomb you want an arial, then it is said to chtext to replace {\fabsalom|b0|i0|c2|p2;
with {\farial|b0|i0|c2|p2;
the procedure is more complicated but also allows to change the associated font (which the lisp does not do)

the string to be replaced can also be obtained from the chtext only by selecting a single mtext
 
hi, I'm new to the forum and I found this discussion that interests me a lot. I have the same problem that had brizzo1982 (I have a design with many writings that I have been past to which I have to change the character but with "machprop" it does not work: I should do it to one by one! I would like to use the lips that you indicated but I did not understand how to use it and make it work. Could you kindly write the steps you need to do? Thank you.
 
open note block, in a new file paste the list of the post above and save it with name mtextcf.lsp in the folder you want.
in autocad type appload, select the newly created file and then click on "load".
by command line type mtextcf


here you can also see other methods to load the lisp:http://www.cad3d.it/forum1/showthread.php?t=496:smile:
 
open note block, in a new file paste the list of the post above and save it with name mtextcf.lsp in the folder you want.
in autocad type appload, select the newly created file and then click on "load".
by command line type mtextcf


here you can also see other methods to load the lisp:http://www.cad3d.it/forum1/showthread.php?t=496:smile:
Thank you....I followed the instructions....but it doesn't work...:confused: ...according to you xkè?? ? ?
 
Thank you....I followed the instructions....but it doesn't work...:confused: ...according to you xkè?? ? ?
from afar it is difficult to know, if you don't tell us something more...

which instructions you followed:

Did you create the lisp with the text editor?
Did you upload it in autocad with appload?
did you type mtextcf?
which message returns autocad?
 
I created the file with note lock and saved it on the desk, then on autocad in the command bar I wrote "appload", and I uploaded the file. When he told me the file was loaded I closed the window. I wrote on the command bar "mtextcf" , and tells me to select the object. I have selected a written and then sent. I then made "matchpropr" from a writing that I had already modified to what I selected with mtetxtcf, but it didn't work... it changes to the max the size of the character (but that did it even before) but not the type of character.....I did it right?? ? Thank you.
 
here is the file... I put only two writings so the file is not heavy: the one on the right is the one I want to get, the one on the left is the one I can't change with macthprop. Thank you very much
ps. I was doubtful if this method does not work because except the file as version 2004, although I work on 2011. usually except in this format for not having problems in copisteria.
 

Attachments

the one on the left (serre...) is the text to be treated with the lisp as it has the standard style but papyrus font assigned in mtext, with the lisp itself.

If with matchpropr you want to change the font of mtext, this must be the "proper" of style, idem the source text.

:smile:
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top