[GIS] Error message when trying to export DXF

dxfexportqgis-2

Im using QGIS 2.18.2 and have tried to export layers as dxf using the project tab and by clicking the layer and using save as. Both have given me error message:

Export to vector file failed.
Error: creation of data source failed
OGR error:Failed to open 'dxf-parcels-export.dxf' for writing

Best Answer

There are a couple different ways to export to dxf, one way is to navigate to the 'Project' tab and under there click on 'DXF Export'. Macs and PC's function a little bit differently, so when you are saving your file, if you have a Mac make sure to type in '.dxf' at the end of the file otherwise there might be problems exporting (Windows will automatically fill in the .dxf). This is a crucial step because the file needs to be read as a dxf, so if you don't make sure to add dxf on a Mac then you will get errors.

Another workaround for this could be exporting your file as a SVG ('Scalable Vector Graphic') file through the print composer. If you haven't used the printcomposer before go to ('File' for Windows, 'Project' for Mac)'File' -> 'Print composers' Then add your layer into the composer and you will be able to export the map as a svg file.

I provided a link below of a video that shows a couple workarounds for exporting to dxf. https://vimeo.com/124382089