Book a Demo
Prev Next

Scripting Window

The Scripting window is composed of a toolbar and a view of all scripts according to group. The script groups and their scripts also have context menus that provide some or all of these options:

  • Group Properties - to display or edit script group properties in the 'Script Group Properties' dialog
  • Run Script - to execute the selected script (or press Ctrl while you double-click on the script name)
  • Debug Script - to debug the selected script
  • Edit Script - to update the selected script (or double-click on the script name to display the 'Script Editor', which usually displays a script template, determined by the user group type as assigned on creation or on the 'Script Group Properties' dialog)
  • Rename Script - to change the name of the selected group or script
  • New VBScript/JScript/JavaScript - add a new script to the selected user group
  • Import Workflow Script - to display the 'Browser' dialog through which you locate and select a workflow script source (.vbs) file to import into the Workflow script folder
  • Delete Group/Script - to delete the selected user group or script

You can also move or copy a script from one user scripts folder to another; to:

  • Move a script, highlight it in the Scripting window and drag it into the user scripts folder it now belongs to
  • Copy a script, highlight it in the Scripting window and press Ctrl while you drag it into the user scripts folder in which to duplicate it

Access

Ribbon

Specialize > Tools > Script Library

Script Toolbar

Icon

Action

See also

Create a new script group; this option displays a short menu of the types of script group you can create, namely:

  • Normal Group (New normal group icon)
  • Browser window Group (New project browser group icon)
  • Diagram Group (New diagram group icon)
  • Workflow Group (New workflow group icon)
  • Search Group (New search group icon)
  • Model Search Group

The new group is added to the end of the list in the Scripting window, with the 'New group' text highlighted so that you can type in the group name.

Create a new script file in the selected script group; this displays a short menu of the types of script you can create, namely:

  • VBScript (VB Script icon)
  • JScript (JScript icon)
  • JavaScript (Javascript icon)

The new script is added to the end of the list in the selected group, with the 'New script' text highlighted so that you can type in the script name.

Refresh the script tree in the Scripting window; this icon also reloads any changes made to a workflow script.

Run script.

Compile and execute the selected script.

The output from the script is written to the 'Script' tab of the System Output window, which you display using the View Script Output button.

Stop script icon

Stop an executing script; the icon is disabled if no script is executing.

Delete a script from the model; you cannot use this icon to delete a script group (see the earlier 'Context Menu' item), scripts in the 'Local Scripts' group, or a script that is executing.

The system prompts you to confirm the deletion only if the 'Confirm Deletes' checkbox is selected in the 'Project Browser' panel of the 'General' page of the 'Preferences' dialog; if this option is not selected, no prompt is displayed.

Script deletion is permanent - scripts cannot be recovered.

General Options

Display the System Output window with the results of the most recently executed script displayed in the 'Script' tab.

Notes

  • This facility is available in the Corporate, Unified and Ultimate Editions
  • If you add, delete or change a script, you might have to reload the model in order for the changes to take effect
  • If you select to delete a script group that contains scripts, the system always prompts you to confirm the action regardless of any system settings for delete operations; be certain that you intend to delete the group and its scripts before confirming the deletion - deletion of script groups and scripts is permanent