What is a method for importing/exporting DXF files with QGIS?

I work in an engineering field and we use CAD and specialist design programs, and often go through several iterations during a project.

I am having trouble interchanging data between QGIS and DXF formats. I export several layers from QGIS in DXF format and load them into cad. Essentially I xref the exported DXF files into CAD, and then draw over the top of them in CAD, as I find it quicker and more accurate. The files line up OK, but need to be scaled and transformed to match the coordinates in QGIS. I then detach the xref's, save the new DXF with line work on a single layer. The DXF file coordinates match the QGIS coordinates.

I can't seem to get the new DXF to import back into QGIS. I would like to be able to export and import a particular data table several times as the project develops.

Screenshot 1 - I exported the pink polygons and edited them in CAD. I then imported the DXF file back in but nothing came in - see "entities".

enter image description here

Screenshot 2 - Attribute table of imported layer.

enter image description here

  • 1
    Getting used to QGIS editing tools will be less painful than changing back and forth between GIS and CAD.
    – underdark
    May 15 '12 at 11:47
  • 1
    @boberdorf, why do you need to export and import so many times? Data interchange between between cad and gis isn't pratical because they have different nature.
    – Pablo
    May 15 '12 at 12:07
  • if you can/want to share the type of change that usually run in the CAD environment ... we try to assess the feasibility in Qgis enviroment. Good work!
    – sentenza
    May 15 '12 at 13:46
  • For shape editing, like the images shown, going back and forth between CAD seems cumbersome. However, if you are drawing building footprints and other orthogonal or complex lines, having the advanced drawing tools available in CAD packages makes a lot of sense. Especially if you are using QGIS for modeling and need those speculative footprints as part of your analysis.
    – afwatl
    May 18 '12 at 15:36
  • ah, well I just discovered the cadtools python plugin. It seems to offer a lot of CAD functionality. You can find it in the CatAIS repository. However, that doesn't really answer your question, and I would like to know if there is a good way to go back and forth and preserve scaling, etc.
    – afwatl
    May 18 '12 at 16:07

I have been using mmqgis plugin with some success for transfer / export as csv with geometry.

The dxf format from the cad system which is suitable for import seems to be 2004-2006, coming into QGIs as a delimited text layer. Obviously I use a UTM coordinate system. For a polygon it will export two files, one is the attribute table.

To install mmqgis, you may have to hunt around in the plugin system a little.

The main challenge I expect is that cad exports have so many options for the management of blocks, text etc.

See also my other answer at;



There is now native export into DXF in newer versions of QGIS which allows to export map layers including the labels:

Native DXF export in QGIS

More about the functionality can be found here: https://www.qgis.ch/en/projects/dxf-export

The DXF export functionality was developed by Jürgen Fischer (Norbit) and Marco Hugentobler (Sourcepole AG). The project was co-financed by SIGE (utility provider in Vevey) and the municipalities of Vevey, Morges and Uster.

Unfortunately not that good on the import side. Making sure DXF is in some older standard and do not hope for anything more than import lines, polygons and points without styles, colors, elevations etc.


One option if you use autodesk is to use the mapimport/mapexport commands to convert from dxf to shp and from shp to dxf. This will give you the option to keep the data objects if needed. This way you can edit shp in GIS and edit dxf in CAD.


You can try intersecting the freshly imported layers with old shape file layers containing attribute informations.

  • An intersect would modify the geometry, producing and output that was only areas common to both files. To transfer attributes like you're talking about, a join or spatial join would likely be better, but depend entirely on the data and geometry. In any case, that still doesn't address the key problem in the question of getting the new file back into QGIS.
    – Chris W
    Oct 1 '15 at 0:24

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.