Verify if a Vision Window is open in a Project on another computer running Vision Client

Hi,
I'd like to know if it is possible to check (by script) if a specific Window is open in a specific Project on another remote computer (on the same network) running Vision Client?
Can we get the info from the Gateway?

I couldn't find a ready built-in solution, but there's a few ways to approach it.

If it's always the same window, the same project and the same client, you might just have a window open/close event script on the target project, that checks the hostname (from the system client tags) and sets the value of a memory tag to match the window status.

Otherwise, I would try something similar to this post and achieve it using messages.

Please see system.util.sendMessage() for more details, but the gist of it is you can set hostName to send the message only to the specific computer you want and project to the specific project you want, while specifying the window name in the payload.

Then, in that project, the message handler can check if the specified window is open and send a message back with the result.

You'd need a message handler in your original project that would process the result and do whatever you want with it.

I'm trying to think of a way to make it more automatic, maybe by having the gateway handle a request.

1 Like

Got it working using your first solution with just a small adjustment as just using the Memory Tag and the visionWindowClosed event on the Vision Window

Works great! Thanks.

2 Likes