You are here: Core Reference > Coding > Scripting > Create a Script Library

Create a Script Library

To create a Script Library:

  1. Display the Database Bar (see Display an Explorer Bar in the ClearSCADA Guide to ViewX and WebX Clients).
  2. In the Database Bar, right-click on the Group or System that is to contain the Script Library item.
    A context sensitive menu is displayed.
  3. Select the Create New option to display a further menu.
  4. Select the Other option to display a further menu.
  5. Select the Script Library option to create a Script Library database item. The Script Library database item is added to the database tree structure and is selected, ready for you to define its name.
  6. Enter a suitable name for the Script Library.
  7. Double-click on the Script Library item or right-click on it and select the Edit Script Library option to display the Script Editor for the Script Library.
  8. Type in the script for the Script Library.

    ATTENTION: Be careful when naming functions in your scripts and script libraries. The names of the functions should be unique so that they do not clash with the names of functions in other script libraries (that may be used in conjunction with your script). If the function names are the same, ClearSCADA will only be able to use one of the functions.

  9. Save the Script Library.

The Script Library that you have created can now be referenced by any script of the same language.

Further Information

Reference a Script Library in a Script.


ClearSCADA 2015 R2