QGIS Modeler – How to Run QGIS Model on Selected Features Only

pyqgisqgisqgis-modeler

Would it be possible to run a script in a QGIS model so that it only runs on selected features from an input layer? I don't want to use the option in the toolbox options as I have other models that require to run without selections.

I just a model to only run on selected features in the input layer and return an error if no feature is selected. I'm thinking a script added immediately after the input in the model?

Best Answer

Adding Save selected features should do the trick:

enter image description here

Related Question