Page History
...
To create and maintain script language definitions, click the settings icon next to the script language drop-down on the script and template manager. This opens the Script language maintenance screen:
Icons | Description |
---|---|
Add a new script language called 'Script Language <number starting from 1>'. | |
Create a new script language with the same configurations as the currently selected script language named '<Existing name>_Copy', | |
Delete the currently selected script language. | |
Move the currently selected script language up one place in the list. | |
Move the currently selected script language down one place in the list. | |
Prompt the user to select a .hsclang file to import new script language settings. | |
Prompt the user to specify a location to save a .hsclang file containing the existing script language settings. |
Script language definitions consist of the following:
Property | Description |
---|---|
Name | The name for the script language, as displayed in the drop-down fields for selecting the script language. |
Description | The description of the host script language which is for display purposes only. |
File Extension | The file extension used when the scripts are written to files, for example py for Python script files. If this is left blank, the generated files will have no extension. |
Command | The command to execute a script in the defined language. The token $SCRIPT_NAME$ is replaced with the full path and file name of the script file to execute. For example, "C:\Program Files\Python37\python.exe" "$SCRIPT_NAME$". The defined path must be valid for all 3D clients that are required to execute scripts for the defined script language. |
Script Execution
WhereScape 3D shows a progress dialog when executing scripts. Click the‘Details’ button to expand the progress dialogue and display all output from the script being executed. This gives a convenient place for users to view any success or error messages returned by the script.
...
A selection of environment variables are made available to all scripts executed from within WhereScape 3D.
Variable | Scope | Description |
---|---|---|
WSL_SRCCFG_<configured_field_name> | Browse & Profiling scripts | The name for the script language, as displayed in the drop-down fields for selecting the script language. |
WSL_CON_JSON | Profiling Scripts | The full path to a file containing the output fro the most recent browse script execution. |
WSL_BINDIR | All Script types | The WhereScape 3D installation path. (The default location is 'C:\Program Files\WhereScape\WhereScape 3D'.) |
WSL_WORKDIR | All Script types | The working directory where the script is executed. (The working directory will be in %UserProfile%\WhereScape\3D\scriptExecution.) |
WSL_TASK_NAME | All Script types | A name used to identify the workflow task. |
WSL_SEQUENCE | All Scripts | A sequence id to identify each workflow process. |
WSL_WRKFL_Repo | Profiling & workflow scripts | The repository name associated with the object selected in the repositories pane. |
WSL_WRKFL_Category | Profiling & workflow scripts | The category name associated with the object selected in the repositories pane. |
WSL_WRKFL_Model | Profiling & workflow scripts | The model name associated with the object selected in the repositories pane. |
WSL_WRKFL_Version | Profiling & workflow scripts | The version name associated with the object selected in the repositories pane. |
WSL_WRKFL_Group | Profiling & workflow scripts | The group name associated with the object selected in the repositories pane. |
WSL_WRKFL_Table | Profiling & workflow scripts | The table name associated with the object selected in the repositories pane. If no table object is selected then the value should be an empty string. |
WSL_WRKFL_Column | Profiling & workflow scripts | The column name associated with the object selected in the repositories pane. If no table object is selected then the value should be an empty string. |