Opening a Vista Diagram from TGML components
You can open a vista diagram from a TGML component. This topic uses an example to illustrate how you can configure a TGML component to open a vista diagram.
To open a link from a component:
- Open the Graphics Editor: Go to Start > Power Monitoring Expert > Graphics Editor.
- At the bottom left, select Components.
- Expand the Basic Controls tab, and then drag and drop the button components to the workspace.
- At the bottom left, select Snippets, and then drag and drop Pop-Up onto the Button component in the workspace.
- At the bottom right, select Objects.
-
Define the Link attribute value:
- Expand the Definitions > Component node to find the Link attribute within the button.
- Log in to the PME Web Applications (https://localhost/Web or https://IPaddress/web).
- For example, in Diagram Library select on the three dots of any vista diagrams, Open in New Window, and then copy the highlighted new window URL.
- Go back to Graphics Editor TGML page, double-select on Link > Object, and then paste the copied URL.
- Select Save to save the TGML file.
Button TGML components have a built-in snippet script for opening either in the same tab or in a new window. You don't need to add additional snippets over the button TGML components. Instead, select any button component and under the Link Name property, if the button definition is Open New Window, enter the URL of file you want to open. And, for all other button components, either give the TGML file name that you want to open on the select event of that button. For example: tgml\Test1 or the URL of the file.
To test the changes:
- Go back to PME Web Applications page that was already open, and then refresh the page.
- Select the saved TGML file in the Diagram Library menu:
- Select Button.
URL saved graphic file name is displayed in the Diagram Library menu.
The following screen is displayed:
The following screen is displayed with the linked URL in a Pop-Up: