Singel Vision Instance


is it possible to allow only 1 started Vision-Client Instance per computer.

Today i was looking on a Computer where operator started 8 Instances :S.

Many Thanks in advance.


Something like this in the client startup script:

# Get current session info
tagNames =	['[System]Client/User/Username',

tagsIn = system.tag.readBlocking(tagNames)

userName = tagsIn[0].value
project  = tagsIn[1].value
hostName = tagsIn[2].value

# Get all session information
sessionInfo = system.util.getSessionInfo()

# Filter sessionInfo for matches of username, host and project.
x = [row for row in sessionInfo if row['username'] == userName and row['project'] == project and row['address'] == hostName]

# If there is more than one matching session, commit suicide
if len(x) > 1:
	from java.lang import System

perfect, this make sense :slight_smile:
Thank you

You might pop a message box and let them know what’s happening before they call support about the Vision client “crashing”… :grimacing:


Nope. No fun there. :stuck_out_tongue:

1 Like

Note that it won’t work properly for clients behind a NAT. If you need to support such clients, I recommend using the MacID in the client of the outbound network connection to uniquely identify the Vision client. Use system.util.sendRequest to report new clients to the gateway, and a maintain a global map of client IDs vs MacIDs there.