2

How can I enable the checkbox of atlas of print composer in QGIS 3.4, from Python Console in QGIS?

Here a image:

enter image description here

1

1 Answer 1

3

You have to search your layout (lyt) by name (lytname) in the layoutManager of the QgsProject instance, get the atlas and enable it :

lytname = "mep"
lyt = QgsProject.instance().layoutManager().layoutByName(lytname)
lyt.atlas().setEnabled(True)
2
  • Also, as I can activate Preview Atlas from Python Consoles.
    – leotv
    Commented Mar 11, 2020 at 16:19
  • 1
    lyt.atlas().beginRender(). Commented Mar 11, 2020 at 22:13

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.