Link Objects to a Library Script
If a library script requires specific system objects to run properly, you can manually link those objects to the script, so that the system can check for the presence of the required objects. This is useful, for example, if a scripting library will be used in different projects, which may not already contain all the required objects.
- Select the scripts block. For example:
Project > System Settings > Libraries > L4-Project > […] > [scripting library] > [scripts block].
- Select the Script Editor tab.
- Open the Scripts expander and select a script from the list.
- The Viewer expander displays the code of the script. Here you can check for any objects referenced in the code, that you may want to link to the script.
- Open the Linked Objects expander.
- To associate a required system object to the script:
- Drag the object from System Browser into the Linked Objects expander.
NOTE: You cannot link objects from Event List or, in case of distributed system environment, objects that belong to a system different from the local one.
- To remove the link between an object and the script:
a. Select the linked object.
b. Click Remove.
c. Click Yes.
- The objects listed in the Linked Objects expander are linked to the script. The Status field indicates whether the object currently exists in the project and is of the correct type. A Create button alongside allows any missing objects to be created.