This code works in QGIS 2.14 but not in 2.18. What do I have to change to be able to export properly to DGN. From what I understand, now it tries to save in microstation V8 format instead of v7.
I don't want to use "convert format" from the processing tool box, I'd really like to save directly to DGN without intermediary steps.
QgsVectorFileWriter.writeAsVectorFormat(
couche_source, #loaded layer
enregistre_sous, #path to save as
'utf8',
QgsCoordinateReferenceSystem(2950, QgsCoordinateReferenceSystem.EpsgCrsId),
'DGN',
False,
None,
skipAttributeCreation = True,
)
I really don't know what to do, and I didn't find anything helpful to me.
Even when I try to save as DGN directly form QGIS it doesn't work. I get this error message :
Export to vector file failed.
Error: creation of layer failed (OGR error:creation option '' is not formatted with the key=value format)
And I did not modify anything in the options.
ogr2ogr -f DGN dgntest.dgn test.shp
. If you need to have the job done, use GDAL even you do not like it. In any case, write to qgis-users mailing list and ask if this is a known issue or perhaps a new bug.