Hi,

can somebody help me with load  a dxf file  as a vector layer?

Is QgsDataSourceURI an option? I tried with this code, but I haven't been
lucky.

fitxer="/tmp/prova.dxf"
uri = QgsDataSourceURI()
uri.setDatabase(fitxer)
uri.setDataSource('', 'entities', None, "OGR_GEOMETRY='POINT'",
'EntityHandle')

layer = QgsVectorLayer(uri.uri(), 'prova', 'ogr')

print 'source:', layer.source()
print 'isValid:', layer.isValid()
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to