04-30-2020 09:48 AM
Hi All,
I want to load values from an ini file at runtime into the teststand model via a property loader.
I do not know the size of the data (number of strings) within the ini file until the property loader has ran, how can I programmatically create a container based on the size of data found within the property loader?
E.g. data within ini would be....
option 1, option 2, option 3......option n
Container created in teststand will contain
options1 to option n
The desired result is to be able to pass a container full of strings to a teststand user interface written in labview. The data will be used to populate a combobox.
Thanks
05-01-2020 12:28 PM
Does it have to be a container? Why not use an array? For example you could have a container of key value pairs and make an array of them.
05-03-2020 04:34 AM - edited 05-03-2020 04:39 AM
No I don't suppose it does. I would be happy with an array, I just assumed both would have the same issue.
Both would be of unknown size until the property loader has executed.
Could you elaborate on what you mean by "container of key value pairs and make an array of them"
Thanks
05-04-2020 10:40 AM
Because you are using this information to send to the UI via UIMessages my guess is that each piece of data needs to be identified somehow. So make a datatype with 2 elements. One of them is the key, or identifier, that is of type string. This way when you iterate through the array you can use the key to identify what the data is. Not sure if this is relevant to your situation but it sounds like it might be.
05-07-2020 07:50 AM
AndyTT,
You can use PropertyLoader in TestStand 2016 or later to create non-existing properties.
Do the following to test the creation of non-existing properties:
Once you have it working, all you need to do to create non-existing properties is to modify the file with all the required properties to be created (along with its type information). Property loader step will create those properties on execution.
-Shashidhar