Bug Watch March 2004

Text Torments on Trial

Txtexp torment revisited
Thanks to Thomas Rausch for providing more information about the Txtexp problems described in Bug Watch November and December 2003. Txtexp torments 1 and 3 are triggered by turning the system variable WMFBKGND off. To work around them, turn that variable on before using the Txtexp command. The problem has been around for a while, but AutoCAD 2004 makes it more obvious because WMFBKGND now defaults to off rather than on. This change was made to improve compatibility with other programs.

Workaround: As the WMFBKGND setting isn't stored anywhere, you need to remember to turn it on before using Txtexp. Alternatively, you can edit the TXTEXP.LSP file in the Express Tools folder (C:\Program Files\AutoCAD 2004\Express) so that it turns WMFBKGND on before creating the WMF file, then restores it to its previous setting. After you've made a safe copy of TXTEXP.LSP, find the following section of code:

If you're affected by the bug in your own AutoLISP programs that use the Express Tools function (acet-wmfin), you can modify your code in a way similar to that shown above.

Txtexp torment 4 (2004 SP1)
Here's another Txtexp bug that's not cured by the above workaround. Txtexp doesn't work correctly when a nonWorld UCS is current. For example, if the UCS is rotated 10 degress about the z-axis, any text you explode rotates -10 degrees from its original angle and may shift from its original location.

Workaround:

Set the UCS to World before using the Txtexp command. You could modify the TXTEXP.LSP code to do this at the start of the command and then restore the previous UCS at the end.

Txt2mtxt torture (2004 SP1)
Continuing with the theme of misbehaving Express Tools text commands, the Txt2mtxt command (Express/Text/Convert Text to Mtext) does not work correctly when a nonWorld UCS is current. For example, if the UCS is rotated 10 degrees about the z-axis, any text you convert to mtext rotates 10 degrees from its original angle. But at least when you do a Txt2mtxt followed by a Txtexp, the bugs cancel each other out to retain the correct rotation angle!

Workaround: Set the UCS to World before using the Txt2mtxt command.

Tatty text (2002 to 2004 SP1)
On some systems, the Mtext editor displays text as too light, too dark, fuzzy, or otherwise difficult to read. This may depend on the zoom level at the time the editor is invoked. Mtext that displays correctly in the editor in one instance may be unreadable if you zoom in or out before editing it again. Similarly, TrueType text may be legible when SHX text is not, or vice versa.

Workaround: In some cases, turning off font smoothing in Windows can cure this. Bring up the Display Properties dialog box (Control Panel/Display or right-click the desktop and pick Properties). On most systems, pick the Effects tab and make sure Smooth Edges Of Screen Fonts is turned off. However, depending on your graphics board and driver, this option may not be available. In such cases, you need to hunt around and experiment with the settings the driver makes available. An Advanced button or tab is a likely place to look.

About the Author: Steve Johnson

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!Follow Lynn on Twitter