Using TestStand API, you can programmatically get the list of users and access each user's attributes by calling the following API expressions:
- Call RunState.Engine.UsersFile.UserList property, which returns the reference to an array of Users, each belonging to Property Object class.
- Call RunState.Engine.UsersFile.UserList.GetNumElements() method to get the number of configured users.
- Call GetPropertyObjectByOffset method to access each User object individually, passing an offset value which corresponds to the index of the array element you need to get.
- For example, to retrieve the name of the first user in the TestStand users list, you can call the following expression: RunState.Engine.UsersFile.UserList.GetPropertyObjectByOffset(0,0).Name
Additional Information
You can also place
GetPropertyObjectByOffset method in a loop, incrementing the offset parameter at each iteration of the loop, in order to loop though the entire array of users.