Bug Watch: Opening Trusted Drawings

6 Nov, 2006 By: Steve Johnson

Is 2007 SP1 the answer to your dialog woes? Does your LISP go loopy? Should you only open Trusted drawings?

A Lack of Dialog: Final Redux? (2005 to 2007)
Darren J. Young has provided me with a lot of useful information from his efforts to define this problem. He observes that the trigger is plotting to any Heidi (non-Windows) device and notes the following symptoms:
  • File dialog boxes only list extensions, not descriptions of file types.
  • The layout tab Copy/Move dialog goes AWOL.
  • The layout tab New from Template option no longer works.
  • The Dxfout Command line loses its options.
  • The Hatch dialog goes AWOL.
  • Help / About crashes AutoCAD.
  • Drawings with names like DrawingN.dwg, where N is a number, become %s - %sN.dwg.
  • Closing all drawings causes AutoCAD to lose all of its toolbars, including the small one you would normally see.
  • The toolbar controls for multiple undo and redo lose their lists of commands.
  • The icon to the left of the File menu gets mangled.
  • Right-clicking on the system tray icons ceases to work.
That's all excellent information, but with a bit of luck it will be moot. Autodesk thinks it has fixed the problem in AutoCAD 2007 SP1. If you think differently, please let me know.

LISP Lunacy (14 to 2007 SP1)
If you type little snippets of LISP code in at the Command line, you have probably experienced what appears to be AutoCAD going quite loopy. Type a bit of LISP, use the up arrow key to recall it, start editing and the Command line goes crazy. This has been going on ever since Release 14 introduced Command line recall and editing.

Here's a small example that reproduces the bug. In this case, the trouble is triggered by single quotes when parentheses are deleted. I'm pretty sure that there are several other ways to make the Command line lose its mind, but this will do for a start. Type or paste the following into the Command line, without pressing Enter:

(mapcar 'list '(1 2 3) '(4 5 6))
Use the left arrow key to place the cursor immediately after the second ' (quote). Press Delete. Before you get a chance to finish editing, AutoCAD goes insane and spews out this:
Command: (mapcar 'list '1 2 3) ; error: bad argument type: listp 1
Command: '(4 LISP command is not available.
Command: 5 Unknown command "5". Press F1 for help.
Command: 6))

Workaround: None known.

Comment: Trusted DWG
One of the few new non-3D things in AutoCAD 2007 is the Trusted DWG feature. You may not have used this, but you have almost certainly seen it. Using AutoCAD out of the box, you may have noticed the Command line displaying this rather amateurish partial message [or half-message] when you open a drawing: or Autodesk licensed application. You may have even seen this alternative amateurish half-message instead: result in stability issues. If you have a tall Command line window or you use F2 to flip to the text window, you can read the rest of the message. The first message indicates that you have opened a Trusted DWG. The second indicates that you have opened, presumably, an Untrusted DWG. In such cases, by default you'll also see an alert box that repeats this message and offers you the opportunity to cancel the open. In addition, a tray icon displays either a check mark on a green background or an exclamation point on a yellow background.

So, exactly what is a Trusted DWG? It's an Autodesk drawing, at least in theory. Autodesk doesn't want you opening any of those nasty competitors' drawings without you being warned off first. You can read what Autodesk has to say on the subject here. In short, Autodesk says non-Autodesk drawings may give you problems, so you need to be warned about them.

I don't intend to take sides on this issue, I'll just let Autodesk and its competitors sling mud at each other and leave you to decide who comes out dirtiest. I will point out that in my experience, Autodesk's argument has some validity. I have had problems with non-Autodesk drawings over the years. I have also had problems with Autodesk drawings, particularly those that originate in AutoCAD's vertical variants. Given the choice, I would prefer a drawing file created by vanilla AutoCAD over one created by anything else, Autodesk product or not.

If we accept the premise that all non-Autodesk drawings are untrustworthy, there are still several problems with the way Trusted DWG has been implemented.

  1. If a drawing is saved in a DWG format prior to AutoCAD 2000, AutoCAD 2007 can't tell where it came from.
  2. I have had more problems over the years with drawings that originated in badly written DXF files than I have with DWG files. Trusted DWG does nothing for these problems. In fact, a drawing can be made Trusted by saving it as DXF and re-opening it, even though that doesn't strip out all of the problems.
  3. Similarly, inserting an Untrusted drawing into a Trusted one is enough to make it Trusted.
  4. In some cases, simply opening and re-saving a drawing in AutoCAD is enough to make it Trusted. This does not apply in all cases, though.
  5. Autodesk-created drawings that have internal problems are still considered Trusted, lulling the user into a false sense of security.
  6. It seems rather pointless to display the icon and message in cases where the drawing is Trusted. It would have been better to only inform you that something unusual has happened, rather than bombarding you with "business as usual" information.
  7. The Open Design Alliance, which develops software to allow most of Autodesk's competitors to read and write DWG files, has announced that it can create DWG files that AutoCAD 2007 considers Trusted. Read Cadalyst's story for more information.
  8. There is no way to disable this feature. If you have a startup routine that displays a Command line message, that message is going to be scrolled out of the way. See DWGCHECK Heck below for details.
Overall, I have to rate this feature as "could do better." AutoCAD's definition of what is Trusted and what is not is somewhat arbitrary. A messed-up drawing that will cause you no end of problems may be Trusted, while a perfectly clean one may be Untrusted. As a result, the feature in its current state is of very limited use. Rather than engaging in what looks suspiciously like a marketing exercise, I would prefer Autodesk put its efforts into utilities for diagnosing and repairing problem drawings, well beyond the current capabilities of Audit and Recover. If such utilities happen to point out the details of all sorts of genuine problems caused by non-Autodesk products, then so be it. It would be much more useful than the current approach. Evidence of specific problems that users can see for themselves would also be much more convincing than Autodesk's marketing assertions and broad-stroke approach.

DWGCHECK Heck (2007 to 2007 SP1)
According to the AutoCAD Help, the new DWGCHECK system variable checks for potential problems when opening drawings. What it's actually supposed to do is to control AutoCAD's behavior when opening non-Autodesk DWG files, and DWG files that generate certain errors. It's the latter that is described in Help as potential problems.

There are two problems. First, Help incorrectly describes the way in which the variable works. Second, the variable actually works in a way that does not make sense, is inconsistent with other similar variables and doesn't let you turn the feature off.

Help suggests that DWGCHECK can be set to 0, 1, 2 or 3. It can actually be set to values from 0 to 7, and is a bit-coded variable. Bit-coded variables generally work by starting at 0, where everything is turned off, and adding values of 1, 2, 4 and so on to turn on various aspects of the feature in combination with each other. With this variable, a setting of 0 does not turn off the feature. Help suggests that it will restrict AutoCAD to warning only about potential problems, ignoring the non-Autodesk aspect. In fact, all it does is prevent one of the three warnings about non-Autodesk DWG files. The alert box does not pop up, but the icon and Command line warnings still appear. In fact, even with a setting of 0, the icon and a Command line message still appear even in healthy, Trusted drawings.

Workaround: None known. If the Trusted DWG feature survives in AutoCAD 2008, here's hoping that Autodesk completely rewrites the behavior of this variable. Let's have a 0 setting that makes sense and a variable that gives users properly documented bit-coded control over the appearance of the icon, the message, the alert and all other relevant aspects of the feature.

More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!

For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!