Good day,
Can anyone help me on how to do Multi-instance Pop-ups? for example i have 5 valves and when i click the valve 1, it opens a popup and i click valve 2 it opens another and i would see 2 popups…
Thanks
Newbie Here
Good day,
Can anyone help me on how to do Multi-instance Pop-ups? for example i have 5 valves and when i click the valve 1, it opens a popup and i click valve 2 it opens another and i would see 2 popups…
Thanks
Newbie Here
have you looked at ignition university? there is a course that illustrates this concept.
yeah i have seen it but i dont think it shows what i need… what if i press 2 valves…i need also 2 pop-ups…on their tutorial, they didnt included 2 pop-ups…only 1 pop-up at a time if you press different valves…
EngrFramdee
you need to use “system.nav,.openWindowInstance” in your script instead of “system.nav.openWindow”
https://docs.inductiveautomation.com/display/DOC/system.nav.openWindowInstance
I allow the operator to determine if they want just one pop-up opened or multiple pop-ups. If the user left mouse clicks it will open/use one pop-up, if the user right mouse clicks it will open an additional window.
The following code would go in the mouseClicked event -
[code]param1 = event.source.parent.TagPath
if event.button == event.BUTTON1:
window = system.nav.openWindow(‘Control/Valve’, {‘TagPath’ : param1})
if event.button == event.BUTTON3:
windowInstance = system.nav.openWindowInstance(‘Control/Valve’, {‘TagPath’ : param1})
system.nav.centerWindow(windowInstance)[/code]