01-08-2015 08:36 AM
I have a DAQmx Task Name control on my VI that allows the user to select from a list of existing Tasks created in MAX.
I would prefer this list of "available tasks" to be displayed (and eventually have one task selected) using a listbox.
For the life of me I can't figure out how to get the DAQmx Tasks into a listbox.
Anyone have any advice?
Solved! Go to Solution.
01-08-2015 09:06 AM
Convert the names of the tasks into an array of strings.
01-08-2015 09:33 AM
Im trying to use the Variant To Flattened String Function but am not having any success.
The input variant is a list of available tasks.....so it must be a variant array?
I think i need to ....
1)get the size of the variant array
2) use a while loop to convert each element into a string
3) add each string to a string array....
Im new to LV so its very confusing.
01-08-2015 10:13 AM - edited 01-08-2015 10:14 AM
Where are you getting the vaiants from? It should be an array of tasks (a DAQmx task is a data type). Just wire that array straight into the ItemNames propty for your listbox.
01-08-2015 10:35 AM
Ahh....I didn't realize it was its own data type. For some reason I had it in my head it was a variant because of the purple color. Thanks a bunch crossrulz!
This solution works perfectly.