4

In QGIS processing scripts we can define a folder as input parameter as follows:

[...define input/output parameters...]
##mypath=folder
[...rest of the script...]

Question: Is it possible (and if yes, how) to set a default value for mypath?

According to the approach for setting defaults for string input parameters

#'spam' is the default here
##egg=string spam

I tried various things like

##mypath=folder C:\tmp
##mypath=folder C:\\tmp
##mypath=folder 'C:\\tmp'

but none of them seems to be valid.

2

You can set default paths for folders in QGIS 3.0:

Script

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.