Code 1: Will open the file in a different window
/(!JSOnLoad) window.open(/(!Panel:!Title), "_blank", "height=600,width=800"); /(!JSOnLoad)
Code 2: Will open the File inside the function panel that uses the template
/(!MainArea) <embed src="/(!Panel:!Title)" width="100%" height="100%" /> /(!MainArea)
NOTE: You can see the results of using these code snippets in step 6.
In CA PLEX create the following functions:
FileViewer
PDF_Viewer
Open the Action Diagram for the “PDF_Viewer” function and add the following code in the “Pre Point Set Panel caption text”:
Cast Environment<*Message text>, Input![]()

This will set the received URL as panel title for the function in order to open the file using the custom template we have created.
To open the PDF file, call the “PDF_Viewer” function. That this function requires the URL from the file as a parameter.
Generate your functions and test them in Eclipse.
Test using the “Code 1” from step 2

Test using the “Code 1” from step 2