Jump to content

Create Array From Listbox Event


Recommended Posts

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

Link to comment

There are many ways to do what you want. One example would be to build a simple action engine which would hold an array of configured tests. I would suggest that you also use this to maintain the list of tests instead of using the shift register in the main VI.

Another option would be to use an array of LVOOP objects, but you might not want to go into that yet.

By the way, your deselect case is very Goldbergish. Other than the fact that it uses the Value property instead of the terminal (which isn't very good), it uses a while loop to create what is essentially a for loop. Also, you can do the removing more easily sorting the array and then reversing it in order to delete the elements from the end of the array first.

If you want, there are links to some tutorials here.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.