From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
07-24-2017 04:00 PM
Hello,
In the attached main VI (main2sub), how do I going about passing the names of the listboxes from the MIAN VI to the the subVI?
Thanks,
hiNI
Solved! Go to Solution.
07-24-2017 05:24 PM
Use the ItemNames Property.
mcduff
07-24-2017 06:20 PM
Do you have to unbundle then bundle each element in the cluster then pass that to the subVI?
Thanks.
07-24-2017 06:27 PM
The names come out as an array of strings.
You can pass the array directly into your subVI, or you can pass a reference from the listbox to your subVI and use the property ItemNames in the subVI.
Maybe you can better explain what you want. A listbox may not be the correct control, maybe just use an array instead.
mcduff
mcduff
07-25-2017 09:31 AM
The premise is that this listbox is used as a selection box for inputs into the subVI. This listbox is created from parsing repeated data. Each new dataset creates an input into the listbox. After the listbox is created, I can then go and select one or more input to generate plot data. Here is a screenshot of my main VI:
I can then go and select one or more rows from either the "Temp", "Test Condition" or "LO Freq" and the idea is to get the plots accordingly...
I tried this option:
but could not get the names to appear in the subVI.
Is there a way to have the full cluster pass through to the subVI?
07-25-2017 09:37 AM
Hi hiNI,
I tried this option: but could not get the names to appear in the subVI.
Is there a way to have the full cluster pass through to the subVI?
- You already wire the "full" cluster to the subVI - why use an additional reference too?
- When you use a reference for the cluster you need to read the cluster element references first. Use them to read the content of those listboxes…
07-25-2017 09:38 AM - edited 07-25-2017 09:39 AM
No, listboxes do not pass the names.
You can try something like this.
Edit: GerdW beat me with words.
07-25-2017 10:31 AM
You might also be interested in going through the list of selected items, and only returning the ones the user choose, and only pass that into the subVI.
Also if you are looking for allowing a user to select multiple items from a listbox, I would suggest you look into some code I posted here, which allows for item selection by clicking checkboxes in a listbox, multicolumn listbox, or tree. What is returned is the array of items selected as tags.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord