Jump to content

Changing font face/style at once


jay-d

Recommended Posts

Hello, is there a way to change MTEXT properties of various texts on a drawing quickly?

 

For example. I have entered a bunch of MTEXT numbers that are scattered all over a drawing.. but I messed up on the font that I used. I need to change it to match another drawing.. instead of selecting each and every MTEXT, then right click > properties and changing the "contents" to a different font face and size.. is there a quicker way to do this so it affects all the MTEXT without having to select them one by one?

 

Do I make any sense?!

Link to comment
Share on other sites

It depends how the MTEXT properties were set... unfortunately many people set them in the MTEXT creation box in which it is possible to change font, text style, colour, etc. but this is generally seen as bad practice because of the very problem you're highlighting here. Rather than selecting each MTEXT entity, there's a lisp routine that removes all of this format data across all of the entities you select called STRIPMTEXT... you can then alter it in a more conventional way as described in the other posts :)

 

/edit Ah good, you got it sorted.

stripmtext[308].zip

Link to comment
Share on other sites

  • 2 years later...

The original was written by Steve Doman and John Uhden - More here:

http://cadabyss.wordpress.com/

Featuring some great demos by Lee Mac

 

 

Thanks very much Steve and John.

 

I put a little post together here:

How to remove unwanted formatting from AutoCAD Text with StripMtext Lisp/

Edited by Pablo Ferral
Updated Links
Link to comment
Share on other sites

  • 10 years later...

I have Autodesk Civil 3D 2019 and unfortunately the stripmtext command wouldn't work even thought I followed all the instructions. I am assuming it's because of the autocad latter version. Please let me know if you have an updated version, thank you!!

Link to comment
Share on other sites

3 hours ago, RobDraw said:

 

 

 

This is the one I am using attached below. Yes, I loaded it first. When I use it, it just doesn't do anything at all. in the command space, it says "StripmText Completed, objects processed" But nothing is changed . Also I uploaded a picture below showing what I was hoping to use the command for. i have so many mleaders whose colors are all already set "by layers", however they do not reflect the layer color. Then I find out the actual text in the text editor were all set individually to different colors. So I was hoping to use the stripmtext command to reset all the mleaders colors and properties. Please let me know what I am doing wrong or how can I make it work.

mLeader.png

StripMtext%20v5-0b[1].lsp

Link to comment
Share on other sites

19 hours ago, Rana Elhakim said:

 

 

This is the one I am using attached below. Yes, I loaded it first. When I use it, it just doesn't do anything at all.

 

The LISP works. It's already in my toolbox. It must be doing something if you are getting the message.

 

Do you get the dialog box with the settings?

 

Do you have color checked?

 

 

Color.jpg

Link to comment
Share on other sites

On 1/25/2021 at 11:04 AM, Rana Elhakim said:

I have Autodesk Civil 3D 2019 and unfortunately the stripmtext command wouldn't work even thought I followed all the instructions. I am assuming it's because of the autocad latter version. Please let me know if you have an updated version, thank you!!

Newest version I know of was from 2010 https://www.theswamp.org/index.php?topic=31584.0

Hadn't used it in a while. After testing neither versions 5.0b or 5.0c would work in 2021.

Version 3.08 removed font and color changes but not strikethrough or leaders.😢

Link to comment
Share on other sites

BIGAL, could you explain more what you mean?

 

RobDraw, yes I get this toolbox and I do keep all the boxes checked, but nothing happens. Here is what I have in the command box.

 

image.png.3ea492ffca2301a4c5e7af57ef8c1bcd.png

Link to comment
Share on other sites

Lee-mac.com is the site for lee Mac who contributes here all the time and is the best solution provider. 

 

If others are saying code is working then post a dwg for testing. 

 

Worked for me CIV3d 2020 and Bricscad V19

Link to comment
Share on other sites

Hello
 

If you are having trouble running StripMtext in AutoCAD 2021, please verify you have installed the AutoCAD  2021.1 update that was released in August 2020. 
 

This update fixes a bug in AutoLisp that broke the Vbscript RegEx object which StripMtext (and similar routines) use to find and remove formatting codes in a mtext.

 

if after verifying you still are having trouble, then let me know and I’ll look into it. 
 

HTH,

Steve Doman

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Thanks Steve!

Gotta wait on MIS to install the update for my 2021.1 but tried With the 2021.1 update both 2019 and 2021.1 are working perfect. 

Edited by tombu
Got the 2021.1 update
Link to comment
Share on other sites

You’re welcome Tom.

 

I forgot to say that if you are unable to install the 2021.1 update, then second choice is to set the AutoCAD system variable LISPSYS to zero and restart AutoCAD. The caveat is AutoCAD will then use the old VLAIDE rather than new Visual Studio. 
 

Steve Doman 

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