Importing a Library Script into the Project

A scripts library (for example, Project > Libraries > L4-Project > […] > Scripts) contains a script that you want to use in the project.
To be able to execute or edit the script, you must import it so that it is added under Applications > Logics > Scripts.

Be careful when importing scripts

To avoid unintended side effects or conflicts during the scripts execution, before importing scripts into a library or project, it is recommended to check the scripts already present in the system.

Additionally, to help save system resources, it is recommended to avoid importing unnecessary or wrong scripts.

 

  • System Manager is in Engineering mode.
  1. In System Browser, select Application View.
  1. Select Applications > Logics > Scripts > [scripts folder].
  • The Script Editor tab displays.
  1. Click Import .
  1. In the File Open dialog box, navigate on disk to the project libraries folder containing the script you want to import.
    For example, [project name] > Libraries > Global_Scripting_Project_1 > [subfolder].
  • The JS script files contained in selected folder display on the right-hand pane of the dialog box.
  1. Select the file you want to import and click Open.
  • The library script is imported and added under Application > Logics > Scripts. In the file system, the .js files of the imported scripts are stored under the folder MyProjects > scripting >.
    At the time of importing, scripts are hashed to protect against subsequent tampering. A script is tampered event is generated if you try to execute a script that was modified after being imported.
  1. (Optional) To activate validation checks on the signature of the newly imported script, click Enable Signature Validation .

In case of issues with linked objects for an imported script the following message displays:

Please verify the status of linked objects of the imported file
along with one of the following descriptions:
- At least one linked object has a type that is not present in the system.
- At least one linked object is missing in the system.
- At least one linked object is present in the system with wrong type.

Check the script library and fix the issue (that is, create any missing objects). See Create Missing Objects for Library Scripts.