[PythonCAD] Improved DWG Reader

Art Haas ahaas at airmail.net
Fri Oct 3 13:01:49 EDT 2003


On Fri, Oct 03, 2003 at 09:20:36AM -0700, Michael Montagne wrote:
> This could be a really useful tool.  You can't even use ObjectDBX and
> VBA to get sysvars for lots of drawings!  What are the plans to read
> Acad2004(R16)?  Doesn't OpenDwg have libraries for that too?
> 

The AutoCAD 2004 DWG format is apparently completely different from previous
versions, and based on the info at the OpenDWG group much more complex.
The format involves various encryption techniques and other data
mangling "features" that made the file format more complex. The OpenDWG
people have reverse engineered some/most/(all?) of the file format but
haven't made public the format. If it gets made public I'll work on
adding it, but trying to decode the format myself is not possible right
now. There is enough to do in supporting the older formats, and it would
be nice to add writing DWG files to the library. That is a long-term
goal.

The OpenDWG people do offer libraries that can handle the newest format.
I have never used them so I have no idea how they perform. I'd suggest
visiting the OpenDWG forums for more info and feedback.

I've also become interested in seeing these DWG readers be written in
Perl, as I know that would be immensely useful to anyone using Perl when
dealing with DWG files. Once the DWG readers take some sort of stable
form it may be an interesting project to convert the readers to Perl.
I've looked a bit at this and it seems like a Perl reader could be
created without relying on any extra modules - the vec() function will
almost certainly be used for handling the the bitstreams that the
objects are stored in. Having the readers written in Perl would
potentially draw in more developers who could help maintain any
open-source DWG handling programs, correct errors and omissions found
in the OpenDWG spec, and contribute their skills to enhance the
performance of any DWG reader or writer. Let's not forget the
occasional flame war or two as well ... :-)

Art
-- 
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.

-Thomas Jefferson to James Smith, 1822



More information about the PythonCAD mailing list