11-05-2018 10:48 AM - edited 11-05-2018 10:50 AM
Good afternoon
I'm building a toolbar with a variable number of boolean (because the final user will add or remove controls from the front panel). Only one button can be active at a time.
I need to programmatically get all Boolean Control from panel, sort them by Label Text and build an array with the status (true or false) of the sorted controls.
My problem is how do I get the Refnum of all boolean and receive these Refnum sorted by the Label text?
Please find attached my VI.
Solved! Go to Solution.
11-05-2018 01:04 PM
You can only change the number of booleans at edit time. Is that what you are doing?
@mthheitor wrote:Only one button can be active at a time.
Why not use a radiobutton control?
Can you explain the purpose of all this? Seems convoluted.
11-19-2018 07:33 AM
Hello @altenbach
I didn't know that I could put distinct custom booleans inside the "Radio Button" controller. Thanks for the tip.
Let me explain the purpose of my code:
I work in a research lab of a University from Brazil (Universidade Federal de Uberlândia - UFU) and we develop researchs in areas like FHPP (friction hydro pillar processing), tribology, oil platform steel, hydrogen embrittlement, etc.
We use LabVIEW in most of our data acquision. But each project has a different developer and, consequently, a distinct User Interface in each of the applications.
Example: print.png against print2.png
My job is to develop a standard layout and user interface for the softwares. This way we will have a visual identity.
This standard VI will be used in future researchs too.
My plan is to do a main.vi with five panes. Each pane will load a subvi. (see print3.png)
Some subvi will need communicate with others.
The radiobutton solved the problem "only one button can be active at a time". And the VI output is a U32_numeric with the selected boolean. Thanks
In the future the developers will add/remove controllers, like delete the 2nd button from print4.png and add another custom boolean in its place. My concern is the order of the buttons in the U32_numeric output, cause LabVIEW sort the controllers in order of creation.
Today the 1st button output is 0, 2nd button is 1, 3rd button is 2, 4th is 3. But if I delete the 2nd to add other customized boolean, the order of the output changes. (See subvi2 (2).vi)
11-19-2018 07:46 AM
Here are some suggestions for some of the use cases that you need:
Bob Schor
11-27-2018 10:55 AM
@Bob_Schor thank for the suggestion. The "not visible" property will come at handy.
The boolean control colors are a good idea. But LabVIEW only offers a single ugly solid color option.. no effects 😞
These booleans are from my "Menu Bar", so transparent background will be aesthetically better.