I have a model running on the processing framework it produces a serie of vector layers as output(alt-0, alt-1, alt-2, alt-3, and so on). I have prepared the model keeping the order of these alternatives from zero to 5. But when running the model these vector layer are listed pretty much randomly (see pic below). I tried to re order the .model with a notepad editor but nothing changes. Is there a way to set the order on the window of the model for the outputs?
-
3I've opened a bug report for this issue, since I think that this is a pretty important problem and I can't figure out how to solve it. I hope that some developer can help me to understand what to do to avoid this. hub.qgis.org/issues/13217– MattiaCommented Aug 20, 2015 at 6:59
2 Answers
Starting with QGIS 3.32, it is possible to reorder model output layers:
https://github.com/qgis/QGIS/pull/52996
With QGIS < 3.32 the order is totally random:
https://github.com/qgis/QGIS/issues/44184
I've solved the issue by a "manual workaround": after having the output order completely messed up by the graphical modeler I manually swapped the coefficients of the alternatives calculated by the model and changed the names of the metadata, and the outputs (ex. alt_3 became alt_0; alt_4 became alt_1 and so on...). Now the end, everything is in the correct order.
-
2I'm having a similar issue, but every time I run the model the outputs come out in a completely random order (ie no clear pattern) did you ever find another solution to this. Commented May 6, 2018 at 15:16
-
2Also not working for me, I think one needs to add the respective algorithms that create the output in the correct order, which is annoying if you add the one which shall write the first output last. Only workaround I found was exporting the model as a Python script, change the order there and run the whole thing as a script instead of a model.– s6hebernCommented Dec 16, 2020 at 13:40