AEC

Bug Watch March 2004

12 Mar, 2004 By: Steve Johnson

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:

(command "_.mirror" SS "" PT1 PT2 "_y"
"_.WMFOUT" TMPFIL SS "")
Add lines above and below it as follows:
 (setq wmfbkgnd-old (getvar "WMFBKGND")) ; Remember WMFBKGND setting
 (setvar "WMFBKGND" 1)                   ; Turn WMFBKGND on

(command "_.mirror" SS "" PT1 PT2 "_y"
"_.WMFOUT" TMPFIL SS "")

 (setvar "WMFBKGND" wmfbkgnd-old)        ; Restore WMFBKGND setting
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.


AutoCAD Tips!

Lynn Allen

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 Tips & Tricks Tuesdays free e-newsletter and we'll notify you every time a new video tip is available. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter


Latest News from Cadalyst Partners
Feed
Autodesk FormIt 4.0 & Dynamo Announced at AIA 2013   19 Jun, 2013

Autodesk’s free conceptual tool for the ipad, Autodesk FormIt was just updated as version 4. FormIt is the 1st Architectural Form Modeler for the...More>>Read all Between the Lines blog posts>>

Feed
Producing Cool Millions with PTC   19 Jun, 2013

The equipment in China’s restaurant kitchens is much like that everywhere else– stainless steel refrigerators, cold workstations, ice...More>>Read more PTC Creo blog posts>>

Feed
Update 3 now available for Revit 2013 Products - Revit Clinic   18 Jun, 2013

...More>>Read more BIMbuilder blog posts>>

Feed
SolidWorks customer Signatech helps give new life to Alpine racing at Le Mans   19 Jun, 2013

Living in France, I have always been fascinated by the yearly 24 Hours of Le Mans race, which began in 1923 and is the world’s oldest active sports...More>>Read more SolidWorks Blog posts>>

Feed
EngineerVsDesigner: E72 – Mark Setrakian of Robot Combat League   19 Jun, 2013

What does it take to design and build giant robots that fight each other to total destruction in four...More>>Read more SolidSmack blog posts>>

Poll
How many years' experience do you have using CAD software?
Less than two years
2–5 years
6–10 years
11–20 years
21+ years
Submit Vote




FREE Resources for CAD, BIM, and PLM Users





Subscribe Cadalyst Newsletters