Tuesday, 11 June 2019

pyqgis - Creating QGIS action which copies features between layers?


i tried (i never tried before...) to write a simple python code like action in QGIS on my "XXX" vector layer that:



  1. open a layer "YYY"

  2. copy the selected feature on my "XXX"layer

  3. paste the selected feature in the "YYY" layer


Point 1) work ok, but point 2) don't work



Here is my code:


qgis.utils.iface.addVectorLayer("/home/stefano/Documenti/YYY.shp", "YYY", "ogr");
qgis.utils.iface.actionCopyFeatures()


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...