10-29-2024 04:12 PM
Hello al,
Hope you're doing well!
I have a problem with array and I don't know how to solve it, I hope someone can help me. I have 5 text files, each one has three columns and several lines (example attached). I'm trying to use a combobox to display only the first column by joining all the rows of the 5 lists.
Sample lists:
I'm trying to make the combobox look like this:
... Adding the missing lines
My problem is that I don't know how to join several 2D arrays and end up with a 2D array with all the lists joined.
I can only show one list in the combobox, but I don't know how to join the other lists in the same combobox.
Solved! Go to Solution.
10-29-2024 04:56 PM - edited 10-29-2024 08:47 PM
Diagram pictures are a poor choice to demonstrate a coding issue and let's not complicate the problem with listboxes.
You have a couple of 2D input arrays and want to create a new array by selectively combining the inputs.
Please attach a simple VI containing the various input arrays as diagram constant and explain what you want.
Some glaring issues and questions:
10-29-2024 05:05 PM
See if this can give you some ideas. (We wire the lower index to get a column and built array is in concatenate mode):
10-29-2024 05:52 PM
Hello, thanks for checking my issue. I'm adding the VI and lists. I only want the combobox to display the items from the first row of the 5 text files. NUM1, NUM2, NUM3... NUM13. They don't need to be sorted alphabetically or in any other way, just that the items are displayed as they are read by the program.
10-29-2024 06:42 PM - edited 10-29-2024 06:52 PM
Why do you have so much duplicate code? Here's what I would do:
Of course you could use "list folder" with LIST*.txt as pattern to generate the array of files.
Also:
Why do you have a greedy loop that cannot be stopped and reads the same files millions of time per second?