I have a shapefile layer of contour lines that I'd like to export to DXF, but I want to have each feature be on a layer defined by an elevation attribute. I saw here that something like this should be possible, but can't find how to do it.
I tried both "Save As" and "Project -> DXF Export," and saw no obvious option to set the DXF layers. I also tried creating an attribute called "layer" (and also tried "Layer" and "layers") to see if either export method would automatically use this attribute for the DXF layer, but got nothing.
I can get this to work using ogr2ogr, but is there a more direct way to set the DXF layers on export in QGIS? (BTW I am using QGIS 2.18.3)