NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to tell if a user has logged in to teststand

I am using a custom LV UI. I would like to know if there is a way to tell if the user has clicked the cancel button on the standard TS login. I would like to keep using the standard TS login if possible.

 

Thanks




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 1 of 4
(3,785 Views)

Hi Joe,

 

Unfortunately, the default TestStand login code uses a TestStand engine method (DisplayLoginDialog) to handle this dialog box.  The method returns a user object based on the user's selections, and cannot be modified.  However, a clone of theTestStand login code developed in LabVIEW can be downloaded from the developer zone.  This set of VIs does not use this method, and will allow you to configure what data is returned by the dialog.The files can be downloaded here:

 

LabVIEW based Login Reference Example for Teststand

 

Let me know if you need any help configuring this code, and I'll be happy to help!

Al B.
Staff Software Engineer - TestStand
CTA/CLD
0 Kudos
Message 2 of 4
(3,761 Views)
If you just want to know if a user is logged in you can check the Engine.CurrentUser property.
0 Kudos
Message 3 of 4
(3,749 Views)
Yeah I know of both of these properties and I use them. I spoke with an AE about this yesterday and was able to come to a solution. I was not allowed to modify the existing Login function. What i really wanted to know is if the user hit the cancel button instead of logging in. The way that I accomplished this is to get the Engine.CurrentUser reference. This will return a null refnum if they hit the cancel button. However, this will only work when first starting teststand and no one has logged in yet. this is fine for because we only allow the user to login once during application startup. In order to login as a different user then they have to restart the application



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 4
(3,745 Views)