NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Display user groups and privileges

Solved!
Go to solution

Hello world!

I'm trying to build with LabView a custom operator interface for TestStand. I've already realized a VI whose front panel contain a listbox where are displayed all available TestStand users (see attached file). Once selected a user by clicking on its name, it is displayed in the string control.

Now, besides displaying selected user name, I would like to display: in a listbox, the list of groups (Administrator, Operator, ...) to which selected user belongs; in another listbox, the list of privileges owned by selected user.

How can i do this?

Thanks

 

0 Kudos
Message 1 of 6
(4,514 Views)

Hi,

try to consider this KB, this forum post and this one for some examples.

I hope this will help!

 

Bye!

 

Licia

Message 2 of 6
(4,484 Views)
Solution
Accepted by topic author aRCo

Thanks LiciaP!

Following your suggestions too, i succeeded doing what i wanted.

See attached VI for the solution. Considering that i'm a novice, i ask if someone can check the block diagram in order to suggest code organization improvements.

Ciao

0 Kudos
Message 3 of 6
(4,446 Views)

aRCo wrote:

 

i ask if someone can check the block diagram in order to suggest code organization improvements.


You need to ask in the LabVIEW forum. Smiley Wink

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 4 of 6
(4,333 Views)

Hi,

 

Just a few points.

 

When I run your VI and pressed the Exit button I received a number of not released objects message:-

 

References to PropertyObjects were not released properly.
    Total number of objects: 3
    Number of top-level objects: 3

    Note: Some top-level objects may be included if they are referenced by
    an incorrectly released top-level object. For example, an unreleased
    SequenceContext object references a SequenceFile object.

    The following top-level objects were not released:

        PropertyObjects [3 object(s) not released]
            PropertyObject #1:
                Name: Members
                Type: Array of Strings

            PropertyObject #2:
                Name: Members
                Type: Array of Strings

            PropertyObject #3:
                Name: Members
                Type: Array of Strings


Basically your while loop was iterating for 4 but I only had 2 users setup, therefore the GetNumElements was 0 for 3 of the groups which generated 3 PropertyObjects which were not released because the for loop wasn't being performed.

 

So I have put the for loop in a case statement (see attached)

 

 

You have a number of GetEngine calls which you could aviod using by just passing the Engine reference in from the Initial GetEngine.

 

You have a string array in a for loop and a const controlling the number of iteration, use the size of the string array to do that job

 

Not sure why you have 2 Operator entries in the Groups array as you stop the loop at the first one.

 

 

Regards

Ray Farmer

 

 

 

Message Edited by Ray Farmer on 09-11-2009 09:52 PM
Regards
Ray Farmer
0 Kudos
Message 5 of 6
(4,318 Views)

Hi,

 

I had a little play with your example (this was using LabVIEW 8.6)

 

User name_groups_priv.PNG

 

 

Regards

Ray Farmer

Message Edited by Ray Farmer on 09-15-2009 09:59 PM
Message Edited by Ray Farmer on 09-15-2009 10:02 PM
Message Edited by Ray Farmer on 09-15-2009 10:03 PM
Message Edited by Ray Farmer on 09-15-2009 10:04 PM
Regards
Ray Farmer
0 Kudos
Message 6 of 6
(4,285 Views)