From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Autologin operator

Hi All.

I'm trying to figure out how to autologin "operator" from the OI, I don't want to use Callbacks, because this will also influence in the editor, as far as I see it.

I have tried to "play" with propertynodes, but cant figure out where to write the user information.

So please help.

Kind regards Bojer
0 Kudos
Message 1 of 2
(2,714 Views)
There are a few ways to do this.

1) Using the front end callbacks (you can still force a login on the editor if you check for the property RunState.IsEditor). Check to see if it is the editor. If it is, follow the normal callback. If not, then automatically log the user in. You can do this by using the Engine property "Current User". You must obtain a user object (which is done by calling Engine.GetUser with the login name). Set this object in the Engine.CurrentUser.

2) If you want to only change the operator interface, you can do it another way. You can set the property on the ApplicationMgr (if you are using the UI Controls) for "LoginOnStart" to be false. You can then get the engine object from the ApplicationMgr control, and follow the same steps as above.

Hope this helps!

Allen P
NI
0 Kudos
Message 2 of 2
(2,702 Views)