NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programatically Create Teststand User Group

Hi all,
 
I'm having trouble programatically creating a new teststand User Group. I wrote an application to allow creation/deletion of users and modification of privileges using LabVIEW a while ago. However, coming back to this code to add required group functions is proving problematic. I simply cannot find the equivalent of the NewUser() function etc for groups. I suspect to do create a new group I need to do something along the lines of:
 
IEngine.UsersFile.UserGroupList.InsertSubProperty ......
 
If anybody knows how to do this i'd really appreciate some pointing in the right direction.
 
Many Thanks,
 
Steve


Message Edited by SteveBale on 05-29-2008 06:10 AM
0 Kudos
Message 1 of 3
(3,038 Views)
You are on the right track.  User Groups are just User objects that are put in a certain place (UsersFIle.UserGroupList).  Create a User with the desired attributes for your user group.  Then, get the UserGroupList like you did below.  Then call SetPropertyObjectByOffset with the 0x1 option passing in the User you created for the Group.
0 Kudos
Message 2 of 3
(3,028 Views)
Perfect, Thankyou very much Smiley Happy
0 Kudos
Message 3 of 3
(3,026 Views)