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.
- System Manager is in Engineering mode.
- In System Browser, select Application View.
- Select Applications > Logics > Scripts > [scripts folder].
- The Script Editor tab displays.
- Click Import .
- 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.
- 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. Ascript is tampered
event is generated if you try to execute a script that was modified after being imported.
- (Optional) To activate validation checks on the signature of the newly imported script, click Enable Signature Validation .
NOTE: 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.
Check the script library and fix the issue (that is, create any missing objects). See Create Missing Objects for Library Scripts.
- At least one linked object is missing in the system.
- At least one linked object is present in the system with wrong type.