DWG Compatibility

DWG is probably the most common format for drawing transfers. StreamCAD will never be a success if it doesn’t reliably handle DWG files. But does that mean that it have to be native?

I think of DWG as a very hostile format. Over the last couple of releases, Autodesk has been encrypting the format. A “trusted DWG” is identified by the string “Autodesk” inside the file. Marking it such might be a trademark violation for anyone by Autodesk.

Many design decisions inside DWG was made in the 1980’s. Some things really need to be changed, e.g. the weak link between title block attributes and their definitions. 

There’s a number of problems with managing DWG natively. The most important is that it’s tied into a programming interface called ARX. ARX is a powerful API, but it’s more than twelve years old and the goal is to create something better. ARX applications are heavily tied to Microsoft Windows, which would basically mean that most applications would never run on Mac OS X or Linux.

My goal is to do the following:

  1. If possible, use translation.
  2. Otherwise, go to dual mode. In dual mode, I have a native drawing that acts as a front for the DWG. 

In dual mode, objects that StreamCAD doesn’t understand are drawn directly from the DWG. All data is stored into the DWG.

2 Responses to “DWG Compatibility”

  1. Sylvain Says:

    Hi,
    Are you using the Open Design Alliance DWG library, or are you doding the DWG support from scratch ?

  2. admin Says:

    I’m using the DWGDirect library from Open Design Alliance. This would certainly make it simple to build a version that uses native DWG and that publishes an ARX equivalent (DRX).

    The problem is that it would make programming it more cumbersome. E.g. adding properties would be outside the class library, not a virtual member function as it is in the API today.

    The next beta adds paperspace and a very easy way for end users to define new paper sizes. I’m sketching on a third type of space (let’s call it “timespace”) that would change with time, making it a great match for CAM and visualization tasks. There is no equivalent in DWG.

Leave a Reply