
QGIS 2 Cookbook
By :

CAD files, such as DXF and DWG files, can be opened with QGIS. This recipe shows you how to do this.
Wake_ApproxContour_100.dxf
file. Click on OK in the vector layer selector dialog and the layer will be added to your project, as shown in the following screenshot:DXF files are read as normal vector layers although they do not have the same structure as a regular vector layer as they do not allow adding arbitrary attributes to each geometry.
The example DXF file that you opened contained just one type of geometry. DXF files can, however, contain several of them: in this case, they cannot be added to QGIS in one layer. When this happens, QGIS will ask you to select the type of geometry that you want to open.
In the sample dataset, you will find a file named CSS-SITE-CIV.dxf
. Open it and you will see the following dialog:
Select one of the available geometries, and a layer will be added to your QGIS project.
DWG is a closed format of Autodesk. This means that the specification of the format is not available. For this reason, QGIS, like other open source applications, does not support DWG files. To open a DWG file in QGIS, you need to convert it. Converting it to a DXF file is a good option as this will let you open your file in QGIS without any problem. There are many tools to do this. The Teigha converter can be found at http://opendesign.com/guestfiles/TeighaFileConverter and is a popular and reliable option.
Another option is using the free service offered by Autodesk, called Autocad 360, which can be found at https://www.autocad360.com/.
Change the font size
Change margin width
Change background colour