LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Array From Listbox Event

I am still getting used to Labview and wondered if someone could give me any advice on the best way to store test setting values for each element of the listbox.
 
I have two listboxes. 1) That displays three possible tests and 2) That allows any combination of the tests from listbox 1 to be selected via two navigation buttons.
 
Once the user has selected the tests and they appear in the 'selected tests' listobox. I would then like to store values of flow rate and hours for each test so that when the user clicks on the test in the listbox - the corresponding values for that test appear in the flow rate and hours controls.
 
I am not sure whether this needs to be done via a listbox event or a change value event and as I am a novice at building arrays I would appreciate any advice.
 
Many Thanks, Liz
0 Kudos
Message 1 of 6
(3,039 Views)

Hi Liz,

do you really need "Flow Rate" and "Hours" as array?

Mike

0 Kudos
Message 2 of 6
(3,031 Views)

Hi Liz,

here is an example for you. You can add the value for the flow rate to the cluster. I recommend to create a type def for the cluster. Hope it helps.

Mike

0 Kudos
Message 3 of 6
(3,027 Views)

Hi Mike,

I think so, although there may be another method that I do not know about!

I need to be able to store multiple flow rates and hours values so that when the user highlights one of the selected tests - the corresponding value for that test will be displayed in the flow rate and hours box.

Thanks, Liz

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

Thanks Mike, I will try that Smiley Happy.  Having come into Labview from .NET  I seem to forget about clusters and their uses and think everythign needs to be put in an array!!

 

0 Kudos
Message 5 of 6
(3,021 Views)
If you have a single flow rate/hour pair for a test, there's no need to create an array of clusters of arrays. All you need is an array of clusters of 2 numerics.
Message 6 of 6
(2,992 Views)