QCAD 3 Release - Command Line Tools

The new QCAD 3 release contains not only the QCAD 3 application but also three command line tools: dwg2pdf, dwg2svg and dwg2bmp (dwg2png, dwg2jpeg, dwg2tiff, ...).

These three command line tools convert your drawings automatically to PDF documents, SVG drawings or bitmap files. Of course you can also export drawings to these formats using the QCAD user interface, but the command line tools can be much more efficient if you need to convert a whole lot of drawings.

Command line tools are also often used in a server environment where the user interface is part of a web site. This can for example be used to deliver a preview file (e.g. PNG or JPEG) for a drawing on a server.

Linux and Windows users can find the command line tools in the same directory as the QCAD executable. Under Mac OS X, the command line tools are inside the QCAD.app application bundle under ./Contents/Resources.

The basic usage for all three tools is to give it an input file as command line argument. The output file will be generated with the same base name but the appropriate file extension. For example:

dwg2svg mydrawing.dwg

This creates the file mydrawing.svg.

Various command line options are available to write to a different file name / location or specify the details of the conversion. For example to create a PNG bitmap called preview.png using antialiasing, a white background and a resolution of 10 pixels per drawing unit, use the following command:

dwg2bmp -b white -a -r 10 -o preview.png mydrawing.dwg

A list of the supported arguments is available with the -h option, e.g.:

dwg2bmp -h

The same information is also available on our web site at: