06-14-2022 08:20 AM
Hello Community,
I am working with multiple test stations. Whenever I make a change to the user manager or station globals I always need to copy the files "Users.ini" and "StationGlobals.ini" to the other computer. Is there a way to control the TestStand user manager and station globals through a SQL Database?
Solved! Go to Solution.
06-15-2022 01:24 PM
You can pull user info from anywhere in the Front End Callback. I always bypass the Users.ini because it's a terrible way to store user info. You just have to know what you are doing.
For Station Globals, I wouldn't have a good answer for you. Maybe you can have a engine callback in your sequence file for when it loads, inside of there you could read the database and inject those into station globals. My rule of thumb is always avoid station globals.... generally they are a bandaid.
Regards,
06-15-2022 02:20 PM
Hello Jigg,
Would you be able to post an example to help me get started or tips? I have the FrontEndCallbacks.Seq open and I see Logout and Login in Main. Any help is appreciated. Thank you!
06-16-2022 05:06 PM
Hello Jigg,
I ended up skipping the login step and added an action step for a vi I made. The vi returns the user name to be logged in and stores it to a local variable. Then the next step I used the following statement, RunState.Engine.CurrentUser = RunState.Engine.GetUser(Locals.LoginName).
06-16-2022 09:51 PM
This sequence shows how to bypass the users.ini file by just logging in an operator.
Let me know if you have any questions.