Name | Modified | Size | Downloads / Week |
---|---|---|---|
libdwg | 2009-06-13 | ||
OldFiles | 2008-06-29 | ||
README.creole | 2013-10-11 | 2.6 kB | |
libdwg-0.6.tar.bz2 | 2013-10-11 | 740.5 kB | |
libdwg-0.5.tar.bz2 | 2013-09-21 | 709.5 kB | |
libdwg-0.4.tar.bz2 | 2013-08-30 | 591.4 kB | |
Totals: 6 Items | 2.0 MB | 32 |
LibDWG is a free C library to read DWG files. It is licensed under the terms of the GNU General Public License version 3 (or at your option any later version).
DWG is a file format created in the 70's for the emerging CAD applications. Currently it is the native file format of AutoCAD, a proprietary CAD program developed by AutoDesk.
LibDWG is a re-fork from LibreDWG due to its freezing state. Original LibDWG paused since June 2009, it was written using Esperanto, but from September 2003 its development got in the run again, in English. At this moment the decoder is not extensively tested. It reaches 97% read support in the data structures parser and still needs a test suite. An utility application is available, it is a dumping program: dwg-dump.
Please subscribe the package's mailing list for sharing ideas.
If you are looking for general information about the project, check the website.
Or LibreDWG website.
Building and installing the library
See INSTALL for generic instructions. Basically, you do:
$ ./configure [options] $ make $ make check # optional but strongly encouraged $ make install
This builds and installs various files in the "installation dirs":
$libdir ($exec_prefix/lib) -- library files (libdwg.*) $includedir ($prefix/include) -- dwg.h
Use "./configure --help" to see a full list of options you can use to customize the installation dirs. Other options recognized by configure are:
--disable-trace Disable runtime tracing (default: enabled). When enabled, the environment variable LIBDWG_TRACE is consulted on the first decode attempt. Its value is an integer: 0 (no output) through 9 (full verbosity).
Example usage of the library
The check directory contains an application code that links with libdwg:
- load_free.c -- This is a skeleton code. Look there if you want to have a quickly glance on how to use the library.
The programs directory contains utilities that uses libdwg:
- dwg-dxf.c -- Opens a DWG file and converts it to a DXF one. It may be used as an example of how to use the library. Generates R2000 files.
- dwg-dump.c -- Opens a DWG file and outputs a text dump of its data. It is not useful as API usage example, it relies on some of libdwg's src files.
- dwg-preview.c -- Extracts the bmp thumbnail of a dwg file when it is available. It does not give a normal bitmap file, just some kind of raw data not known yet.