LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why am I not being able to display the names on the lisbox when I click run?

Solved!
Go to solution

Figure A below is the VI I built and Figure B is the VI I'm copying. So basically, I want my VI to display the names as shown on Figube B below when I click. However, I am not getting the same results. I have attached both VIs and the notepad file that has the list of names.

Thanks for your help.

Figure A:

Figure A.PNG

Figure B:

figure B.PNG

 

Download All
0 Kudos
Message 1 of 7
(2,151 Views)

So this isn't the first post of your I've seen this in, so I'll comment now - you're using Build Path without a path input, and with an absolute "relative path" at the bottom. If you want to wire an explicit, absolute path, then just remove the Build Path node and use a "Path Constant". You can right click on these and "Browse for Path" which allows you to select the appropriate file.

 

Beyond that, I'm a little suspicious that the "Columns" control being used in the top VI is not the same as the "Column Configurations" being used for the Value Change event. Make sure they're the same control (i.e., that you only have 1 listbox!).


GCentral
0 Kudos
Message 2 of 7
(2,140 Views)

You need to use a Property Node to populate the names in 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
0 Kudos
Message 3 of 7
(2,132 Views)
Solution
Accepted by GRC5000

You are never writing any items to your listbox. The template VI has the items set as defaults and there is no guarantee that they have any resemblance to whatever is read from the file.

 

After reading the file, write to the "item names" property of the listbox.

 

listitems.png

 

(Of course there are many other things wrong with your code fragment. I assume this is part of a real program architecture, such as a state machine.)

Message 4 of 7
(2,126 Views)

And the previous thread:  How do I make a table with a list of names using "Read from Text File Function" block without getti...

Can't quite believe I missed the missing property node to populate the Listbox... doh.


GCentral
0 Kudos
Message 6 of 7
(2,121 Views)

Thank you. You are awesome!!!!

0 Kudos
Message 7 of 7
(2,112 Views)