LSEditor
The LSEditor (LSEditor.exe) is a text editor designed specifically for SELES files: scenario scripts (.scn), dynamic model files (.sel), and landscape event files (.lse).
Key features:
- Syntax colouring to distinguish keywords, comments, variable types, and other constructs.
- Embedded language parser — the same parser used by SELES10 — to check syntax and consistency of
.seland.lsefiles without loading the full application.
Most menu options are standard (open, close, save, copy, paste, etc.). Note: print options are not functional.
The undo function sometimes drops a character — verify the result after using undo.
Colour coding common to all file types:
| Colour | Element |
|---|---|
| Green | Comments |
| Blue | Keywords |
If colours appear incorrect after multiple edits, press the colour format button ("paint bucket") twice to disable and re-enable colour formatting.
3.1 Scenario Script (.scn) Files
The colour coding helps avoid keyword typos and separates comments from functional code. Testing the syntax of a scenario script essentially requires running it — use Open normally in SELES or use the Dry Run option.
3.2 Dynamic Model (.sel) Files
The colour coding helps avoid keyword typos and separates comments from functional code. Dynamic model files define the spatio-temporal state space: time units, landscape events, spatial variables and constants, global variables and constants, legends, macros, scheduled dynamic raster output, and external script variables.
Parsing — Use the Parse menu (or the two Parse toolbar buttons, identified with a pink "P") to test syntax:
- Parse (Check…) — Checks syntax and returns either a success message or an error message with the detected error location highlighted.
- Parse and Save — Same as Parse, but also saves the file on success.
For a dynamic model to be parsed, it requires acceptable default values for any external script variables (which may be used to set file names, input paths, etc.).
3.3 Landscape Event (.lse) Files
The colour scheme for .lse files is enriched to reflect the full SELES variable hierarchy:
| Colour | Element |
|---|---|
| Dark blue | Property names (distinguished from other keywords) |
| Black (italic) | Built-in system variables (e.g. Time, Location) |
| Red | Global variables |
| Red-brown | Global constants |
| Pink | Spatial variables and constants ("layers") |
| Orange | Local variables (global in scope, but local to this landscape event) |
| Light blue | Event variables (unique to each event instance) |
| Medium blue | Cluster variables (unique to each cluster) |
| Light green | Cell variables (unique to each active cell in a cluster) |
| Yellow | Output file variables (used to output fields to tables) |
| Black (non-italic) | Temporary variables (global in scope, existing only in a temporary context) |
Parsing — The same Parse options available for .sel files apply to .lse files. Additionally, if a dynamic model file is parsed first, the defined state-space is retained in memory and used to assess the consistency of the landscape event with the state-space when parsed.
Additional LSEditor options for .lse files:
-
File → Save Parse — Gives an error message but saves the file, then loads how the parser interprets it. Useful to check the precedence ordering of complex functions — the saved parse uses exhaustive parentheses. Rarely needed.
-
Edit → Expressions (also "f(x)" toolbar button) — Provides syntax for most available functions and expressions usable in a landscape event (see Expression Syntax).
-
Edit → Properties (also "x =" toolbar button) — Provides syntax for most available landscape event properties.
-
Edit → Variables (also "X" toolbar button) — Lists variables by type in the landscape event. Note: this dialog is somewhat outdated — global constants and variables are not separated, and system variables are incorrectly shown as "multi-layer" variables.
-
+ / − toolbar buttons — Increase/decrease font size.