2

Is there a way to automatically run any processing models when you open or close a QGIS project? (or maybe a layer?)

I have a model that I run to update multiple fields in multiple shapefile layers, and I would like it to run each time the project is opened and/or closed so that it's not forgotten.

1 Answer 1

5

In your project properties, you can define Python macros.

You have 3 macros:

  1. one when the project opens
  2. one when the project is saved
  3. one when the project is closed

enter image description here

1
  • Thanks - looks like the solution I was looking for. Now if I only knew how to write the code to run the model file...
    – CEL-ma
    Commented Dec 24, 2019 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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