Settings Folder

Location

The settings folder holds the application file, its schema and, by default, the script folder:

Platform Settings folder

PC (Windows)

%APP_RESOURCE_DIR%\etc\lumiscan-script-runner; without APP_RESOURCE_DIR, C:\ProgramData\HD Vision Systems GmbH\LumiScan Vision Suite\lumiscan-script-runner\etc\lumiscan-script-runner

PC (Ubuntu)

$APP_RESOURCE_DIR/etc/lumiscan-script-runner

The Script Runner names the folder it uses in its log at start (Script folder: …​).

Content

File or folder Content

lumiscan-script-runner.json

The application file: the script folder, the engine settings and the modules.

schemas/lumiscan-script-runner.schema.json

The JSON schema of the application file. Editors such as Visual Studio Code use it to check the file and to complete keys while you type.

scripts/

The script folder (the default of scriptFolder): your procedures <name>.hdvp, their interface files <name>.interface.json and any files they read, such as images or models.

The script folder

  • The Script Runner loads every .hdvp file of the script folder at start. A module runs the procedure of the same name: "procedure": "find_pattern" runs find_pattern.hdvp.

  • An interface file <procedure>.interface.json next to a procedure gives the types of its parameters, see Interface File.

  • A file name a procedure gets as an input (a parameter of the semantic type filename) is resolved inside the script folder: blobs.png means scripts/blobs.png.

  • The script folder is also HALCON’s procedure path: a procedure may call other procedures of the folder, and MVTec’s standard procedures load on their own.

  • scriptFolder in the application file may name another folder, relative to the settings folder or absolute.

v1/system/scripts lists the procedures found, with their procedure and interface hashes, where their types come from, and why a procedure did not load.

When changes take effect

The Script Runner reads the application file and the procedures at start.

  • A change to a file (the application file, a procedure, an interface file) takes effect at the next start of the app.

  • A change over the Data Layer (a new v1/system/settings) is checked and saved; the app then sets v1/system/restart-required to true, and every module reports -5 (restart required) and accepts no new request until the app is restarted. A run that is going on finishes.

Restart the app after every change.