Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

MTEXT Contents being forced by inline code

Village_Idiot
Contributor

MTEXT Contents being forced by inline code

Village_Idiot
Contributor
Contributor

Every now and then I run into text that is tough to edit and impossible to change anything about the way it looks because it is forced via inline code.  (Diesel???)  When I try to edit it I can only select the value and do not even see the code. Any idea why this happens and more importantly, is there a way to correct other than replacing the object with new text?  

 

 

Village_Idiot_0-1709735950924.png

 

0 Likes
Reply
Accepted solutions (2)
628 Views
5 Replies
Replies (5)

paullimapa
Mentor
Mentor
Accepted solution

Since mtext supports various formatting codes and there’s no way to prevent users from implementing them you’ll encounter them

https://www.cadforum.cz/en/text-formatting-codes-in-mtext-objects-tip8640


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos

cadffm
Consultant
Consultant
Accepted solution

No DIESEL.

This is MTEXT and internal formatting like Font or bold, all what you can do INSIDE MText editor (doubleclick on MTEXT to enter Mtexteditor)

 

You can also remove all formattings, right click -> remove overrides..

 

Search for StripMText

But this can force unexpected results.

 

Sebastian

0 Likes

Village_Idiot
Contributor
Contributor

Thanks Paullimapa and cadffm.  I can't believe I never noticed the Mtexteditor mirrors what the code is doing. 

FYI - In my version of acad 2023 

  • dbl click text to enter editor
  • select/highlight txt
  • right click menu -->Remove Formatting (ctrl+space)

Thanks 

Village_Idiot_0-1709740860066.png

 

0 Likes

pendean
Community Legend
Community Legend

@Village_Idiot wrote:

.... is there a way to correct other than replacing the object with new text?  


You want to find and use this free LISP to remove override formatting from MTEXT you don't like in your DWG file

https://cadsetterout.com/resources/stripmtext-lisp/

and

https://www.google.com/search?q=stripmtext+lisp+for+autocad 

0 Likes

paullimapa
Mentor
Mentor

glad to have helped...cheers!!!


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes