Skip to content

Opening a Project

You can open a project from the Home page with the Open Project button or from the recent projects list. On Linux and macOS you can also double-click a .spt file in your file manager, which starts SWAT+ Toolbox and opens the project. On Windows, .spt files are not linked to SWAT+ Toolbox, so open projects from SWAT+ Toolbox.

Projects from version 3

SWAT+ Toolbox 4.0.1 opens only projects made with version 4. A project made with version 3.x or earlier is blocked with the message "This project was made with SWAT+ Toolbox v3.x.x and is not compatible with this version (v4.0.1). Opening was blocked." Create a new project from the model's TxtInOut folder or SWAT+ Editor database instead (see Creating a New Project).

Open Project button

  1. On the Home page, click Open Project.
  2. In Choose Existing SWAT+ Toolbox Project, select a file. The file picker accepts:
    • a project file, SWAT+ Toolbox Project (*.spt, *.sptp)
    • a SWAT+ Editor database, SWAT+ Editor Database (*.sqlite, *.db)

The project opens and is shown under Current Project on the Home page.

Recent projects list

Click a project in the recent projects list on the Home page. SWAT+ Toolbox asks "Do you want to load the selected project?" and, if a project is already open, tells you that it will be closed. Click Yes to open the selected project. Clicking the project that is already open does nothing.

If the project file has been moved or deleted, SWAT+ Toolbox shows "Project file not found" and removes the entry from the list.

Portable projects

A .sptp file is a portable project: the whole project folder packed into one file. Select it with Open Project and SWAT+ Toolbox unpacks it into a folder with the same name next to the .sptp file, then opens it. If a folder with that name already exists, you are asked where to unpack it instead. See Exporting a Project for how to make one.

From a SWAT+ Editor database

The first time you open a SWAT+ Editor database, SWAT+ Toolbox creates a project from it (see Creating a New Project). When you open the same database again and that project still exists, the Open Linked Project? dialog shows where the project is and offers three choices:

  • Open Linked opens the existing project.
  • Update and Open Linked updates the TxtInOut folders of all scenarios in the project from the SWAT+ Editor database, then opens the project. You are asked to confirm first.
  • Set Up New creates a new project from the database. The database is then linked to the new project.

Warning

Update and Open Linked overwrites the model files in the TxtInOut folder of every scenario in the project with the model from SWAT+ Editor. Use it when you have changed the model in SWAT+ Editor and want SWAT+ Toolbox to use the new version.

Recovering a damaged project

While a project is open, SWAT+ Toolbox saves a backup copy of the project file every 5 minutes, but only when it has changed since the last backup. The 14 most recent backups are kept, in spt.data/backups inside the project folder.

If a project cannot be opened, SWAT+ Toolbox says "SWAT+ Toolbox could not open this project. It may have been moved or become corrupted." and asks whether to recover from a backup.

  1. Click Yes.
  2. In Choose Project Time To Restore, select the time of the backup you want.
  3. Click Restore.

The backup replaces the project file and SWAT+ Toolbox tries to open the project again. The damaged file is kept next to it as <project name>.corrupt-<time>.spt, so you can go back to it if the backup turns out to be the wrong one. If there are no backups, it shows "No Backups Found".

Backups cover the project file (.spt) only. They do not restore model files, observations or results.