Is it possible to export multiple layers using for loop?
I want to export all vector layers added to the map.
The problem I experience is that the second argument has to be a string but it leads to overwriting the same file over and over again
error = QgsVectorFileWriter.writeAsVectorFormatV2(vlayer,"D://exportedlayer.shp",transform_context,save_options)
I tried two things:
- replacing that string with a variable (layer name)
- concatenating file path with layer name ans .shp extension
but none works. Any ideas?