In QGIS 3.0, "Processing Modeler" window has no "Export as Python script" button unlike QGIS 2.x.

QGIS 3.0 Processing Modeler Window

If you look at the codes (in DlgModeler.ui and ModelerDialog.py files), you see the code lines related to that button.

in ModelerDialog.py (commented):

#            QgsApplication.getThemeIcon('/mActionSaveAsPython.svg'))

in DlgModeler.ui:

<action name="mActionExportPython">
  <property name="text">
    <string>Export as Python script...</string>
  <property name="toolTip">
   <string>Export as Python script</string>

After some editings I explained here, "Export as Python script" button came into view.

enter image description here

Is there a specific reason or is it a mistake?

  • I guess, the reason is changes in the way to write Processing scripts in QGIS 3.0. – Kadir Şahbaz Apr 2 '18 at 2:46

This was intentionally disabled by commit 4f2a464

[processing] remove obsolete code and disable exporting models as script until we update it so support new scripts format

@alexbruy alexbruy committed on 2 Feb

So re-enabling it yourself won't be of any use as the output code won't be usable in QGIS 3x.

| improve this answer | |

Check https://gis.stackexchange.com/a/313547/187 for updates post 3.1!

Spoiler: it's back!

enter image description here

| improve this answer | |

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.