NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem adding User Name to a Group

I'm trying to add a new user. This works fine, however I get an error (value does not have expected type) adding a user to a group. See attached image. Circled code gives the error.





Message Edited by Michael Aivaliotis on 04-25-2008 04:50 PM

Message Edited by Michael Aivaliotis on 04-25-2008 04:53 PM


Michael Aivaliotis
VI Shots LLC
0 Kudos
Message 1 of 7
(3,546 Views)
I don't have LabVIEW or TestStand on this computer, so I haven't tested this, but I don't want to leave you hanging for the weekend since I'm fairly confident I know what's wrong.

The Members property returns an array of strings, not an array of user objects.  You should just be able to insert the string instead of the entire User Object.  Use SetValStringByOffset instead.

Allen P.
NI
0 Kudos
Message 2 of 7
(3,531 Views)
Michael,
 
Attached is an example to add a user to a group
Regards
Ray


Message Edited by Ray Farmer on 04-27-2008 06:16 PM
Regards
Ray Farmer
0 Kudos
Message 3 of 7
(3,522 Views)
Thanks, that did the trick.


Michael Aivaliotis
VI Shots LLC
0 Kudos
Message 4 of 7
(3,503 Views)

Ray,

Could you please send me the vi for this example. I am using LabVIEW 2012 and the PropertyObject (GetType) you specify is not in the lastest LabVIEW.

Thanks.

0 Kudos
Message 5 of 7
(3,070 Views)

Hey Angel22,

 

The GetType method is deprecated, and while it will still work in old VIs which used it, it's not available for use in new VIs. Here's the current best way to do it:

 

GetType.PNG

 

This should have the same effect as the GetType() method. Let us know if you need any more assistance!

0 Kudos
Message 6 of 7
(3,056 Views)

Hi Daniel,

Thanks for your reply. I will like to be able to add a user to a group (Say, Operator). I have been able to create the user but I am unable to add the created user to the Operator group so that they can run a sequence. How can I make this happen. I attached part of my code. Please, advice.

 

Thanks,

 

Angel

Add User to Group.jpg

 

 

0 Kudos
Message 7 of 7
(3,051 Views)