Exporting Items

You can export an item from your project by doing the following:

  1. Select the element on your Page or in your Task.

    Note: If it is a Page, Task, Script or Task, select it in the Project Explorer.
  2. Right-click the element and select Export.

  3. Fill in the details about the exported element. If you want to fine-tune where to export your element exactly, right-click on either the root folder or one of the sub-folders and create a New Folder. Right-click on the newly created folder and select Rename to create a custom name.

  4. Click Export. Your new exported element appears in the Templates Window.

    Note: You can select and export multiple items as a set, if you select only blocks in a single Task, controls on a single page, or tags in the Tags Window. You cannot combine these three element types to make a set.

     

Note:

Templates only hold references of dependent objects. You must either additionally export those dependent objects to be added at import time, or recreate them at import time. For example, exporting Script X that calls Script Y will not export Script Y into the template. An HMI control that is bound to a tag (e.g. $Bee), will not export the $Bee tag itself, only a reference to it.

Consider the following scenario:

  1. Create two string tags: $tg_Hello and $tg_World with respective values "hello" and "world".

  2. Create a Script block that returns a string with one line: return $tg_Hello + " " + $tg_World;

  3. Export the block.

  4. Select the two tags in Tag Manager and export as pair.

  5. Close/ save the project and open a new project.

  6. Drop in the script control template and open it in the Script Editor.

  7. Try to compile the script; it results in an error.

  8. Import the pair of tags.

  9. Try to compile again and now it results in success.

  10. Run the task and observe that the output to the pin is "Hello world".