[GIS] Batch export multiple layers to DXF

batchdxfexportlayersqgis

I have only had limited experience with QGIS.

What i have:
I currently have many different layers (water mains, sewer mains, drainage etc.). These layers are TAB files with attributed data.

What I want:
I want to select (by any means) the relevant layers i need (could be up to 15 layers) and export the layers to DXF so that i can use them in AutoCAD. I would like these layers to export as separate DXF's not all as one DXF. I understand that you can export by selection to dxf, however this is a lengthy process if you need to export many layers.

Why I need this to work:
At work I constantly need to export areas of GIS information from our data base and I have been using QGIS as a replacement for Mapinfo (which I do not have access to any more).

In Mapinfo I used a combination of the plug-ins "MapBasic – Batch Cookie Cutter" and "MapBasic – Batch DXF export with attributes" to first cut all the layers I needed based on a polygon area and then converted the cut layers to individual DXF's – this process took only a few minutes and worked well. I do not know how to do this process or equivalent with QGIS.

Best Answer

Under Processing toolbox (you need to have it switched to Advanced interface) you can find GRASS command v.out.dxf which with right click on it you can execute as batch process.

vector to dxf

After that you can select as many layers from open project as you like or browse into directory of your choice. For DXF vector output you only need to set first location and preferably prefix like trans_ and the rest can be populated after that with autofill settings with parameter set to "Name of input vector map".

Good tip is that if you want to populate the whole column with some value, just set the first row and double click on column header. For example to change "Load in QGIS", set first row to No and double click on that header to avoid loading DXF outputs into QGIS.

Related Question