Adding a Page menu item to Launch a WebDiagram
The following procedure describes how to access a WebDiagram by invoking Cicode from your project menu, however later procedures here describe how to alternatively add a WebDiagram view in your genie equipment popup. For more information, see Add Web Diagrams to Equipment Popups.
To add a new page to the project that will display a given WebDiagram:
- Create a new menu configuration item that calls the
PLS_WebReachDsp
Cicode explained below:- In Power Operation Studio, click Visualization
> Menu Configuration.
- Enter the call to the PLS_WebReachDsp function (found in the PLS_Applications.ci file), with the slideshow (if desired), and the page title.
- In Power Operation Studio, click Visualization
About the WebReachDsp Cicode
In the following step, you will call the WebReachDsp
function from a button. This function is part of the Cicode in the PLS_Include.ci
file, which is packaged with this document. The code is shown here for reference:
FUNCTION PLS_WebReachDsp(STRING sDeviceName, STRING sTitle = "")
STRING sPage = PLS_GetWebReachURL(sDeviceName);
IF ("" = sPage) THEN RETURN; END
IF ("" = sTitle) THEN sTitle = sDeviceName; END
PLS_WebDsp(sPage, sTitle);
END
There are some important things to note about this code:
sDeviceName
is the name of the device, determined in the previous topic.sTitle
is the title of the page
If the diagram does not display, try the following troubleshooting steps:
- Enter the URL of the diagram directly into a browser window; verify that it launches
- The steps above should resolve most issues. One last option is to test by putting the Web browser in a window on the calling page.
The URL is: http://<servername>/ION/default.aspx?dgm=OPEN_TEMPLATE_DIAGRAM&node=<device name>
If this does not work, verify that the WebReachServer is correct in citect.ini
, and the diagram appears correctly in WebReach.