LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I create a new user in CVI?

Hello all!
I'm customizing TS Operator Interface and I'm trying to add a new user with CVI code. Why does it work when I use the following code?

TSObj_User myNewUser;
VBOOL pressedOk;
CAObjHandle myUserProfile;

TS_EngineDisplayNewUserDialog (sTEEngineObj, NULL, "", VTRUE, &myNewUser, &pressedOk);
if(pressedOk)
{
TS_EngineNewUser (sTEEngineObj, NULL, myUserProfile, &myNewUser);
}

Advanced thanks."
0 Kudos
Message 1 of 3
(3,221 Views)
Hello Ning -

I believe we may have spoken in email. It looks as though you are calling two seperate functions to 'create' the new user object (note how both the dialog and the 'newuser' function return a user object). However you now have the task of storing your new user in the TestStand Users.ini file so that TestStand can utilize this new object. Without adding a user object to the UserList, it is a free floating object that isn't handled by the system.

Consider investigating the classes for UserFile, UserList and PropertyObjectFile as these may be of help. If you have access to the TestStand II: Customizations training manual, consider reading through chapter 2 as this will describe creating users in detail, otherwise feel free to ask quesions about th
e relationship between the classes.

-Regards,

Elaine R.
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 3
(3,221 Views)

Hi

 

Is it possible to add a new user with out using TS_EngineDisplayNewUserDialog function?

Help share your knowlegde
0 Kudos
Message 3 of 3
(2,701 Views)