Dear Expert.
I’m using factory studio 9.2.
In project, I created some layouts, and some user accounts security.
In HMI Mode, I want each user account, HMI will use a layout.
Specifically, I have 2 Rich client Computer, I want each computer runs 1 user with a separate corresponding layout.
Is that possible?
If Yes, How can I do that?
Thank much
Hello Thanos!
Yes, it is possible! Add the following code into the ClientStartup Script Task:
string user = @Client.Username;
switch (user)
{
case "userX":
@Client.OpenDisplay("DisplayX", "");
break;
case "userY":
@Client.OpenDisplay("DisplayY", "");
break;
default:
@Client.OpenDisplay("DefaultDisplay", "");
break;
}
This code retrieves the current username via @Client.Username and then, using a switch-case, calls @Client.OpenDisplay(…) to load the display mapped to that user (e.g. userX → DisplayX, userY → DisplayY, others → DefaultDisplay).