Monday 11 April 2016

Order of parameters in QGIS 3.6 graphical modeller


When using graphical modeler in QGIS 3.6 I have added additional parameters to the model inputs for the buffer tool.


The model looks like this:


enter image description here


When running the tool the order of the parameters in the resultant window do not follow the order parameters were added. They appear to be listed alphabetically:


enter image description here


I can change this quite easily by exporting the model as a Python script (as per this question) and changing the order of the input parameters there:


enter image description here


This means my model is a now a Python script rather than a .model3 file. Is there any way to change the order of parameters through graphical modeler. Or alternatively is there a way to save a Python script as a .model3 file?




Answer



There is not currently an intuitive method to achieve this in the Graphical Modeler GUI. A recent answer on another question linked here gave a great work-around that involves numbering the inputs in chronological order to act as Psuedo IDs. You can then rename the inputs after this to whatever you would like.


If you are editing an existing model then you need to create a new copy of the input parameter, give it an appropriate Psuedo ID then delete the existing input.


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...