Hello,

In QGis I have defined a set of actions for a layer. I can trigger the actions 
by selecting the Actions icon in the toolbar, select the appropriate action, 
and then I get a cross mouse icon and can start clicking on features to 
actually run the action.

However, I'd like to start the process (i.e. get the "cross" icon) from PyQgis. 
I've looked at the QgsAction documentation, and it has a run method, but this 
is to apply it to a given feature. How can I run/start/trigger the action from 
python so that I can then start clicking on all the features I want the action 
to be applied to?


The use case is the following: I want to update field X of several features in 
my layer to a new value. I've designed a docked widget so that I can input the 
new value to use, and then I want to start clicking on the features that I want 
to update; then change the value and click on other features, and so on.

The action creation form (image attached) mentions that the action could be 
triggered from a button widget, but I'm not clear if that means I already need 
to know what feature I want it to apply to (which is not the case).

Any help will be appreciated.

Regards,

Didac




[https://immense.ai/email/immense.jpg]<https://immense.ai>



[Twitter]<https://twitter.com/immense_ai>  [Facebook] 
<https://www.facebook.com/ImmenseSimulations/>   [LinkedIn] 
<https://www.linkedin.com/company/immense-simulations-ltd/>



[https://immense.ai/email/spacer.gif]   [https://immense.ai/email/spacer.gif]
Didac Busquets, PhD | Chief Scientist and co-founder
[email protected]<mailto:[email protected]>



Sign up to our newsletter 
here<https://immense.us16.list-manage.com/subscribe?u=bd57eabb3c96301a8f113cbbd&id=c92fc09b7a>
www.immense.ai<https://www.immense.ai>



[https://immense.ai/email/spacer.gif]



Personal data: emails, by default, contain basic personal data and are not 
necessarily secure. If, in answering this email, you provide additional 
personal information, we will process that information for the purposes for 
which you have supplied it and as set out in our Privacy 
Policy<https://immense.ai/privacy-policy/>, which also contains information 
about your rights.

This communication, and the information it contains, is (a) intended for the 
person(s) and/or organisation(s) to whom it is addressed and is for no other 
person(s) or organisation(s) and (b) may be confidential, legally privileged 
and protected by law, including law of copyright. Unauthorised use, copying, 
forwarding or disclosure of any of it may be unlawful. If you have received 
this communication in error, please contact us immediately at 
[email protected]<mailto:[email protected]>.

Immense Simulations Barcelona SL, ES B67427807, C/Corsega, 299, 6e, 08008 
Barcelona, Spain is a subsidiary of Immense Simulations Limited, a limited 
company registered in England and Wales with registered number 09782647,
and registered address at International House, 36-38 Cornhill, London, England, 
EC3V 3NG..
_______________________________________________
QGIS-User mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to