[cad-linux] Re: Command line DWG to DXF converter
- From: "Brian Johnson" <bjohnson@xxxxxxxxxxxx>
- To: <cad-linux@xxxxxxxxxxxxx>
- Date: Wed, 19 Dec 2001 13:42:51 -0500
Pulling out the preview image would do the trick nicely
A batch script in Intellicad or Autocad could process the files (ie zoom
extents and save) and then the command line tool could pull out the preview
image
After that, I could do the rest to automate making the web pages of the
preview images
I think I would list the file location with the image so you could copy the
filename (with path) and paste it into the insert block dialog box
-----Original Message-----
From: cad-linux-bounce@xxxxxxxxxxxxx
[mailto:cad-linux-bounce@xxxxxxxxxxxxx]On Behalf Of AJBIBB@xxxxxxx
Sent: Wednesday, December 19, 2001 1:28 PM
To: cad-linux@xxxxxxxxxxxxx
Subject: [cad-linux] Re: Command line DWG to DXF converter
A couple of items to further this discussion.
1) The conversion from dwg to dxf is accomplished using functions which are
part of the OD toolkit library. All that is required for this conversion is
to call the proper functions. The other conversions (for instance to bmp
or
xpm) require that the data contained in the drawing file be vectorized
first.
In my drawing viewer program these last two conversions are done using
built
in functions in QT (basically snap shots of the contents of the view
window).
2) Vectorizing the data to screen or printer is relatively simple (provided
you have the right drivers or tool kits), but a couple of design issues will
need to be worked out for a command line program. Specifically how to
search
for SHX and XREF files, and what action to take if they are not found. The
first part is easy, but the last is subject to user preferences. I do all
right with computers, but put people into the mix and things tend to get
messy.
3) Since a command line program would only be able to print the last saved
view could you not achieve the same result by just extracting the bitmap
image stored with the file and then saving it as a new bmp file? This of
course would only work with newer drawing files (I believe R13 and above).
4) After your post I spent some time looking at web sites for Ghostscript
and Adobe. It appears that it would be possible to write a program to
export
a picture of a drawing to other formats, but it would require some time to
become familiar with the file format. I also looked at DWF but ACAD does
not
seem to want anyone to write their own versions of a viewer for this format.
You can down load free plug-ins all you want, but don't ask for the
technical
details of the file format.
Anyway - just a couple of things to ponder.
Andy
Other related posts: