09-21-2011 12:28 PM
I am using Teststand 3.0.
I tried to disable User Management in TestStand according to the NI support document (The first way in the following links):
http://digital.ni.com/public.nsf/allkb/4979F8FDB7ED698B8625712B000CFD14
After I put following expression into Statement
RunState.Engine.CurrentUser = RunState.Engine.GetUser("administrator")
Teststand popup following Run-Time error message:
Details:
The post-expression for the step 'Statement' could not be evaluated.
Unknown variable or property name 'CurrentUser'.
Error Code:
-17306; Unknown variable or property name.
Location:
Step 'Statement' of sequence 'LoginLogout' in 'FrontEndCallbacks.seq'
Does anybody know what cause this error?
Thanks,
Ben
Solved! Go to Solution.
09-21-2011 01:32 PM
API in Expressions was not supported until TestStand 4.0. You will have to use two ActiveX steps to do the same thing. The first step will call the Engine.GetUser method and return a value that you can store in a local variable. You can then use that local variable in a second ActiveX step using the Engine.CurrentUser property and set it to the value of the local variable you got from the first step.
09-21-2011 04:41 PM
Thank you very much, this solved my problem.
Ben