NewWindow snippet example

When you select 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:

  1. Select Snippets pane in the bottom left corner, and then from the list of snippets select NewWindow.
  2. Drag and drop the NewWindow snippet over the selected component in the workspace and save it.
  3. In the bottom right corner select Objects, and then expand the TGML node.
  4. Two additional properties appear: Link and Script.

  5. Update the link with the tgml file to be opened.
  6. 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 select 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-select on Link > Object, and then paste the copied URL.

    OR

    a. Log in to the PME Web Applications (https://localhost/Web or https://IPaddress/web).
     For example, in Diagram Library select on the TGML diagram you want to load, and then copy the URL.
    b.Go back to Graphics Editor TGML page, double-clickon Link > Object, and then paste the copied URL.
  7. Select File > Save As > File.
  8. Enter a file name, and then select Save.

To view the snippet behavior:

  1. In a browser, log in to PME Web Applications.
  2. Select the new TGML file from the left panel Diagram Library as shown in the following image:
  3. Select on the breaker to open in a NewWindow: