11-26-2024 08:26 AM
Hi all, first time poster and newbie to LabVIEW.
I am trying to do a simple task of getting data from a multicolumn list-box control to show up in a subVI.
When I attempted this with a Numeric control, I was able to get the data into the subVI control successfully.
However, when I attempted with my multicolumn list-box it was unsuccessful.
I am attempting to do use itemNames which is a 2d array.
The control itself is a 1d array of long, which I believe is the issue.
However, I am not sure how I can resolve this.
Thank you in advance!
Solved! Go to Solution.
11-26-2024 08:38 AM
Why do you make it so hard on yourself?
11-26-2024 08:41 AM
Hi Jeff,
@jyoo221 wrote:
I am attempting to do use itemNames which is a 2d array.
The control itself is a 1d array of long, which I believe is the issue.However, I am not sure how I can resolve this.
You need to distinguish between the value of the multicolumn listbox (MCLB) and its properties (like ItemValues)!
From the MCLB terminal you can only read the values, which reflect the selected rows.
When you need the ItemValues then you need to use property nodes of the MCLB…
11-26-2024 08:43 AM
@Yamaeda wrote:
Why do you make it so hard on yourself?
+1. If you are new to LabVIEW, start with a basic tutorial and learn how to wire these controls properly. When you've mastered that, then play around with external VIs, Variants, Invoke Nodes, etc.
Where did you even learn how to do this stuff as a "newbie"??? 🤔
11-26-2024 09:00 AM
You need to pass the properties (ITEM NAMES) of the list box from the main vi into the properties to the Subvi control.
If you want to do it from the main vi, then you need to get the reference of the control from the subvi and then write the ITEM NAMES properties.
11-26-2024 09:27 AM - edited 11-26-2024 09:31 AM
Would you believe that I am just that inexperienced? I just started learning labview and my mentor has been unavailable recently.
I figured I would try my best while he is unavailable. Sorry you guys got caught in the crossfire, but I didn't want to sit around doing nothing!
my research suggested I try using invoke node.
Either way, I appreciate everyone's input but is there some material I can read up on the about Yamaeda's solution and why this works?
From my understanding the property node is feeding into the SubVI, but how does the SubVi's Item Names 2d array become populated?
The labels are technically different as well.
Again, thanks in advance!
11-26-2024 09:53 AM
Thanks all!
After going through subVI I realized I was able to use the connection pane to determine which input would associate with which control.
Thanks again for the patience and assistance
11-26-2024 10:17 AM
@jyoo221 wrote:
Thanks all!
After going through subVI I realized I was able to use the connection pane to determine which input would associate with which control.
Thanks again for the patience and assistance
Yes, that's how you make SubVIs in general, and also how all VI's are/can be SubVIs. 🙂
11-26-2024 01:36 PM
It will take you a few minutes to go through the first part of this basic tutorial and you will understand the basics you need to know.
It's really amazing that you were able to piece together such a complicated way to do this task as a newbie! It CAN be done that way and there ARE reasons to do so, but they are for much more advanced architectures. I suspect it won't be long until you are on that level though. Are you coming from other language(s) that lead you to use references right off the bat???