I have been trying to set a video to play from certain conditions on some of my perspective views. I was thinking to put these videos to popup views and call this views to popup only in the other views I want and play the video and close the popup automatically. Can system.perspective.openPopup work in tag scripts because I will receive the condition from OPC tag.When I test I get the “No perspective session attached to this thread” error. How do I specify which views the popup will open to ? Is it possible to use tag change for this purpose?
Thanks for helps!
Even though you use tags in a project doesn’t mean the tag itself is part of the project. Tags are attached to a tag provider that is part of the gateway and can be used in multiple projects so if the script is in the tag itself then no system.perspective.openPopup will not work.
Bind the tag to a property in your session or page. Add a propertyChange action script to that property and open the popup from there.
hello @pturmel thank you very much for your answer I was not aware of the property change scripts. What will be the sytnax to open popup view could you please give an example? system.perspective .openPopup is not going to work right as I need to reach other views?