[Qgis-user] Changing Scripts folder location programmatically

Wolfgang Meinolf wmeinolf at bbv-deutschland.de
Mon Dec 13 03:38:37 PST 2021


Hi,
I like to implement a centrally controlled QGIS environment for our workforce using startup.py. Thanks to the list for the very helpful feedback to my previous mails. In startup.py we also like to define and modify some variables containing path to i.e. scripts and models directories. We found the variable names SCRIPTS_FOLDERS and MODEL_FOLDER (Btw, why is it SCRIPTS_FOLDERS but MODEL_FOLDER)

Now: I tried to modify the value using processing.ProcessingConfig.getSetting('SCRIPTS_FOLDERS') and processing.ProcessingConfig.setSettingValue(...)  via console. It works perfectly.

When I put this in startup.py, unfortunately it does not work at all. Interestingly, to define a context variable QgsExpressionContextUtils.setGlobalVariable works in both, consol and script.

Any help is appreciated.

Best regards
Wolfgang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211213/a7fa2820/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3641 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211213/a7fa2820/attachment.bin>


More information about the Qgis-user mailing list