Link snippet example
When you select a TGML graphic that has a configured Link snippet, another TGML page is displayed. Typically, you would use link snippets to navigate between TGML pages and TGML to Web Diagrams.
This topic uses an example to illustrate how to configure a Link snippet.
Prerequisites
This example uses a graphic file that already has a binded component in the workspace. For more information on how to prepare the TGML graphic snippet examples, see TGML snippet examples prerequisites.
To create a Link snippet:
- In the left bottom corner select Snippet, and then select Link.
- Drag and drop the Link snippet over the selected component in the workspace.
- In the bottom right corner select Objects, and then expand the TGML node.
- Update the link with the TGML folder name and file name to be opened. For example:
tgml\test1
. - Go to File > Save As > File.
- Enter a file name, and then select Save.
For example:
Two additional properties appear: Link and Script.
NOTE: You can also open web diagrams from Link snippet. To open the web diagrams, copy the URL of web diagram from PME Web Applications, and paste it in the Link section of graphic editor tool, instead of file name.
If the TGML file is placed in another folder inside the tgml folder, then you need mention all the folder names before the file name using the following format: ...tgml\<sub-folder name>\TGML file name
. For example: ...tgml\My TGML\Test1
. Refer to the following image:
To view the snippet behavior:
- In a browser, log in to PME Web Applications.
- Navigate to Diagrams > Graphic Diagrams, and then select on TGML file. (https://localhost/Web or https://ipaddress/web).
- Select the new TGML file from the left panel Diagram Library as shown in the following image:
- Select on the circuit breaker.
The new link is opened: