<div dir="ltr">You could also use QgsDxfExport, which exports a whole project.<br><div><br><a href="https://qgis.org/api/classQgsDxfExport.html" target="_blank">https://qgis.org/api/classQgsDxfExport.html</a></div><div><br></div><div>Have a look at the tests for sample implementations:<br></div><div><br></div><div><a href="https://github.com/qgis/QGIS/blob/master/tests/src/core/testqgsdxfexport.cpp">https://github.com/qgis/QGIS/blob/master/tests/src/core/testqgsdxfexport.cpp</a><br><br></div><div>Best regards</div><div>Matthias<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 18, 2020 at 7:07 PM Geo DrinX <<a href="mailto:geodrinx@gmail.com" target="_blank">geodrinx@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Good evening to all,</div><div><br></div><div>as in object,  there is a way to save a DXF from a 3D polygon layer, using pyQgis ?</div><div><br></div><div>I am using:</div><div><br></div><div>QgsVectorFileWriter.writeAsVectorFormat(layer, file, "UTF-8", crsCrs, "DXF", overrideGeometryType=QgsWkbTypes.PolygonZ,skipAttributeCreation=True)</div><div><br></div><div>but (also it works with other file types) the option "overrideGeometryType" seems to be irrilevant with DXF, and it saves in 2D.</div><div><br></div><div>Someone can help me to discover the correct syntax ?</div><div><br></div><div>Thank you in advance</div><div><br></div><div>Roberto<br></div><div><br></div><div><br></div></div>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>