NewWindow snippet example
When you click a TGML graphic that has a configured URL In Same Window snippet, another site or web application page opens in the new window.
This topic uses an example to illustrate how to configure a NewWindow 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 NewWindow snippet:
- Click Snippets pane in the bottom left corner and click on NewWindow from the list of snippets.
- Drag and drop the NewWindow snippet over the selected component in the workspace and save it.
- In the bottom right corner click Objects, and then expand the TGML node.
- Update the link with the tgml file to be opened.
- To configure Web diagram in a new window, either:
a. Log in to the PME Web Applications (https://localhost/Web or https://IPaddress/web). For example, in the Diagram Library click on the three dots of any TGML diagram, select Open in New Window, and then copy the highlighted new window URL. b. Go back to Graphics Editor TGML page, double-click on Link > Object, and then paste the copied URL. OR
a. Log in to the PMEWeb Applications (https://localhost/Web or https://IPaddress/web). For example, in Diagram Library click on the TGML diagram you want to load, and then copy the URL. b. Go back to Graphics Editor TGML page, double-click on Link > Object, and then paste the copied URL. - Click File > Save As > File.
- Enter a file name, and then click Save.
Two additional properties appear: Link and Script.
To view the snippet behavior:
- In a browser, log in to PME Web Applications.
- Select the new TGML file from the left panel Diagram Library as shown in the following image:
- Click on the breaker to open in a NewWindow: