LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Display all DAQmx Task Names in Listbox

Solved!
Go to solution

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?

0 Kudos
Message 1 of 5
(4,005 Views)

Convert the names of the tasks into an array of strings.

0 Kudos
Message 2 of 5
(3,998 Views)

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.

 

0 Kudos
Message 3 of 5
(3,987 Views)
Solution
Accepted by topic author Thisismyalias123

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 4 of 5
(3,970 Views)

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.

0 Kudos
Message 5 of 5
(3,959 Views)