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

  • 1
    Have you selected a folder where the file should be saved to, and do you have full writing permission on that folder?
    – AndreJ
    Apr 17 '17 at 16:04
  • 1
    Try running the Convert format tool from Processing Toolbox > GDAL/OGR > [OGR] Conversion > Convert format.
    – Joseph
    Apr 18 '17 at 9:21

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


I'm running qgis on a mac and I just encountered this same issue. I realized that I was getting errors trying to export dxf because I hadn't selected a destination directory for the file. Navigate wherever you want to save it with the "..." to the right of the file name input.


To anyone running into this issue on Mac / PC / Other, it's all the same issue:

Instead of just writing the name you want in the file path, You have to actually click the file path and show it where you want it to save, otherwise it tries to write to a windows / Mac directory file place and you won't have the permission.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.