Text Font vs TEXTSTYLE

Text Font vs TEXTSTYLE

mpukas
Collaborator Collaborator
1,318 Views
4 Replies
Message 1 of 5

Text Font vs TEXTSTYLE

mpukas
Collaborator
Collaborator

I have a question/problem re: Text Font vs TEXTSTYLE. I'm a Revit user, and onl;y use ACAD for survey files I get from my surveyors, which I link into my Revit site file. They export a .dwg from Civil3D, or similar. The file I get needs a lot of re-formatting. The issue is the font for each MText is different than the font specified TEXTSTYLE editor. 

 

The STYLE "Standard" has the font set as "Simplex". When I edit an MText in the drawing, and open the Text Formatting dialog, the font will be something different, such as "txt". I have to do a control-A to select all of the text, and change the font to be the same as that in the STYLE editor. 

 

It's not feasible to do this individually for every MText in the drawing. Is there a way to do it globally, or multiple MText at once? Match Properties doesn't do it, surprisingly (or unsurprisingly). 

 

The main reason is TrueType fonts show up better in Revit when the file is linked. SHX fonts go a bit wonky. 

 

And, why is this even a thing???!!! Why is it possible to "over-ride" the font style in a Text Style only in the Text Formatting dialog???!!! Why isn't there an obvious way to select multiple MText and change all of the their font styles to be as set in the TEXTSTYLE? 

 

Thanks in advance. 

0 Likes
Accepted solutions (1)
1,319 Views
4 Replies
Replies (4)
Message 2 of 5

cadffm
Consultant
Consultant
Accepted solution

Hi,

 

use STRIPMTEXT d to remove internal formats from MText.

(Load by APPLOAD, run by SMT or STRIPMTEXT)

 
 

 

 

Sebastian

0 Likes
Message 3 of 5

paullimapa
Mentor
Mentor

this xplodemtext method may be a bit rash but it'll explode all the Mtext in the entire drawing converting them into Text objects. Then you can as you've done before select them all and change them to the Style you want. But keep in mind that with the formatting gone, the end result has the text looking a bit different.

; xplodemtext function explodes all MText objects in both Model & all Layouts
; modified from:
; https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/mtext-to-dtext-amp-change-font-to-all-text-styles/td-p/9037453
(defun c:xplodemtext (/ ctab myss qaflags)
(setq ctab (getvar"ctab") qaflags (getvar"qaflags"))
(foreach layout (cons "Model" (layoutlist))
 (setvar "ctab" layout)
 (setq myss (ssget "_X" '((0 . "MTEXT"))))
 (setvar "qaflags" 1)
 (command "_.EXPLODE" myss "")
)
 (setvar"qaflags"qaflags)
 (setvar"ctab"ctab)
 (princ)
)

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
0 Likes
Message 4 of 5

cadffm
Consultant
Consultant

>>"this xplodemtext method"

is very good for LT-Users (going thrue the steps by hand&macro) 👍

 

>>"may be a bit rash"

yeah 😫

 

>>"but it'll explode all the Mtext in the entire drawing converting them into Text objects"

foreach different format-piece in a MText, one resultet Textobject.

 

Sebastian

0 Likes
Message 5 of 5

mpukas
Collaborator
Collaborator

STRIPMTEXT works brilliantly. Thank you!!! 

0 Likes