Batch Run

This task is used to run the actions stored in a Batch File. To get general information, see the Batch Processing & Batch Files page.

  • In a Batch run, click Open editor to access the Batch editor or from the Batch files Explorer, select a batch file and do a right click.
  • Click Show comments to directly display all the comments (lines beginning with <comment> element) from the Batch run.
  • In the Debug section:

    • Check the Create debug file on task error option to automatically generate a ‘debug’ batch file if a task gives an error; this debug file will contain the task with all python expressions evaluated.
    • Check the Verbose option to print additional details. The verbose output includes the evaluation of all python expressions.
    • the panel exposes two read-only Python dictionaries for scripting context:

      • app (registered at application startup; extended after opening a project)
        • app["application_name"]: application name, e.g. Isatis.neo-mining
        • app["application_version"]: commercial version, e.g. 2021.12
        • app["project_name"]: current project name (when a project is opened)
        • app["project_path"]: physical project path on disk
        • app["project_public_path"]: path of the project’s public subfolder
        • app["project_batch_path"]: path of the project’s batch subfolder
        • app["project_crs_name"]: project coordinate system name, or "local" if none
        • app["project_crs_proj4"]: PROJ.4 string, or empty if local is used
      • batch (available only in Batch Run and batch Python blocks)
        • batch["batch_file"]: physical path of the currently executed batch file

      Scope: app is injected into the globals of the main Python interpreter and is available in Batch Run, the Calculator, and the Python Script Launcher. batch is available only during Batch Run.

      You can double-click an entry in the Watches to expand and inspect more values than initially visible.

      # Works in Batch Run; 'app' also works in Calculator and Python Script Launcher
      print(app["application_name"], app["application_version"])
      if "project_name" in app:
        print("Project:", app["project_name"])
        print("Public:", app["project_public_path"])
        print("CRS:", app["project_crs_name"], app["project_crs_proj4"])

      # Only in Batch Run:
      bf = globals().get("batch", {}).get("batch_file")
      if bf:
        print("Running batch file:", bf)

    Note: Any looping variables are not deleted when there is an error. This allows you to popup the task that is giving the error.

    If you want to delete all the variables, click on Clear variables (only the app and batch variables will be kept).

  • A right-click on an element, plus the Add/remove breakpoint action, or a click at the left of the element allows setting a breakpoint. A red circle is displayed to indicate that breakpoint.

  • Click on the Run Next button to run the next element in the batch file. It allows you to step through a batch file. The next element to run is indicated with an arrow.

    The element being run is highlighted in blue.

    If an element met an error, it is highlighted in red.

  • Click Run to run sequentially the selected actions of your batch file. A dedicated action/task can also be run interactively when selected. A double-click or a right-click, plus the Popup task action, enables you to pop up the task filled with all the parameters defined in the batch file.

  • Click Close to close the batch file.