[QGIS-Developer] How to save a DXF 3D using pyQgis ?

Geo DrinX geodrinx at gmail.com
Sun Oct 18 10:07:13 PDT 2020


Good evening to all,

as in object,  there is a way to save a DXF from a 3D polygon layer, using
pyQgis ?

I am using:

QgsVectorFileWriter.writeAsVectorFormat(layer, file, "UTF-8", crsCrs,
"DXF", overrideGeometryType=QgsWkbTypes.PolygonZ,skipAttributeCreation=True)

but (also it works with other file types) the option "overrideGeometryType"
seems to be irrilevant with DXF, and it saves in 2D.

Someone can help me to discover the correct syntax ?

Thank you in advance

Roberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20201018/63384381/attachment.html>


More information about the QGIS-Developer mailing list