Multi layout in factoristudio

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,

I’d like to clarify and correct the previous message regarding loading layouts based on user accounts:

The logic should not be placed in the ClientStartup script. Instead, it needs to be executed after the user logs in, using the OnLogin event in the security settings.

Here is the correct code to use in the Login event:

string user = @Client.UserName;

switch (user)
{
case “userX”:
@Client.OpenLayout(“LayoutX”);
break;
case “userY”:
@Client.OpenLayout(“LayoutY”);
break;
default:
@Client.OpenLayout(“DefaultLayout”);
break;
}

This ensures that, once the user logs in, the HMI automatically opens the layout assigned to their specific account.

Summary:

  • Do not place this code in ClientStartup.
  • Use the Login event instead (if you perform login in RunTime).
  • Ensure the layouts (‘LayoutX’, ‘LayoutY’, etc.) already exist in your project.