We can all agree that there are times when we need to link or import DWGs into Revit. Sometimes when DWG files are linked or imported, text gets formatted strangely and causes unwanted overlap, like what is shown in the image below.
This is normally related to text in AutoCAD. The text is in a SHX font style, which are special fonts used in AutoCAD. Before we can solve this, we need to examine the differences between multi-line text (mtext) and single-line text (text) in AutoCAD, and how Revit handles SHX fonts when importing or linking DWG files.
Mtext and Single-line text
Single-line is the oldest version of text in AutoCAD, and it does exactly what it sounds like – creates a single line of text. Regardless of how much text you type, it will always be on a single line and the text box will continue to expand.
Mtext is multi-line text. This type of text is typed within a text box with a specified width. As you add more text within the block, it will automatically wrap to the next line, just like Microsoft Word. This has become the more common text style in recent years.
Revit Linking and Importing SHX Fonts
Revit does not like SHX fonts, plain and simple. Revit dislikes these fonts so much that when DWG files are linked or imported, it converts SHX fonts into TrueType fonts (Windows native fonts). An example of a TrueType font would be Arial, or any other font available in Microsoft Word.
To convert these SHX fonts, Revit looks at the shxfontmap.txt file located at:
For Revit 2018, the path would be: %userprofile%\AppData\Roaming\Autodesk\Revit\Autodesk Revit 2018
This file has only a hand full of SHX fonts, see image. It does not even include all the out of the box AutoCAD SHX fonts. If the SHX font is not in this file, Revit gets confused and tries to find the best substitute.
When Revit links or imports text from a DWG, it converts the font from the SHX font into a TrueType. This conversion can cause the text to change size. If the text was single line text in AutoCAD, it will continue to keep the text in the same line. However, if the text was multiline text, it will automatically wrap, causing the issue you see in the above image.
To solve this problem on importing text, just change the text style to one of Revit’s standard text styles and stretch the box as needed.
Linked text is a little more complicated. The first thing you need to do is add the SHX font to the list in the shxfontmap.txt file and map it to a TrueType font. In the example above, romanc was used in AutoCAD, but we will have Revit convert this to Arial. To do this, locate the shxfontmap.txt file in the directory noted above. This file uses the following format:
“[SHX fontname].shx[TrueType Font Name]”
To add romanc and map it to Arial, the format would be as follows:
When the DWG file is reloaded, Revit will convert romanc to Arial, see image below. As a note, Revit will not regenerate the text until the managed links dialog window is closed. This solved the overlapping text issue because changing the font to Arial caused the characters to wrap to a new line. However, this is not always the case.
If this does not cause the text to wrap to another line, open AutoCAD and explode the multi-line text. This will create separate single line text for each line of multi-line text. As mentioned above, single line text will not wrap. However, it will get wider. The widening may cause other issues so beware of this side-effect.
Become a CADD Care Customer
CADD Care customers receive unlimited support for software issues that impact productivity. Our Certified Helpdesk provides you with direct access to a full-time staff of highly qualified, in-house technical experts that will help you get your software questions answered quickly and accurately. You can email us at firstname.lastname@example.org, or call 703.924.5310. Our hours are Monday through Friday from 8:30am – 4:30pm EST.