LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

combo box auto-updating

Hi, all
I founded that LV don't update Combo-Box constant that created from custom type control "Combo-Box".
Assume we have some custom control "Combo-Box" that have 3 strings. If i create now in diagram constant from this control and add new item in Type Control, the constant is not updated. But if i change constant to control, is updated.
If someone have any idea how to update all constants that linked to Type Control?
0 Kudos
Message 1 of 20
(4,757 Views)

Saving the combobox as a strict typedef will fix this I think, although will limit you if you want the comboboxes to look different in each instance that it is used.

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 20
(4,744 Views)

Saving as a strict type def does not work, it looks like a LV bug.

 

0 Kudos
Message 3 of 20
(4,739 Views)

Interesting, If you place an indicator or control linked to this combo-box strict typedef, it works but not with a constant on the diagram.  Now if you convert the constant to an indicator and then back to a combo-box, it is updated? Guess this is a bug unless there is some reason for not implementing this?  I have used typedef enums many times and this is not a problem, I don't understand the difference. Sorry

 

Paul

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 20
(4,735 Views)
I am using LV7.0 and WinXP incase this has been fixed in 7.1 or 7.1.1
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 20
(4,731 Views)

I was able to reproduce this in 7.1.1.  I will report it to our R&D department.  I noticed the exact same behavior...if you flip to a control and then back to a constant it updates.

 

-Brett Burger

Applications Engineer

National Instruments
0 Kudos
Message 6 of 20
(4,714 Views)
This issue is still present in LabVIEW 8.20.
How peculiar. I would expect a type definition would work with constants as well. However, combo box seems to be an exception. Is this a feature or a bug?
0 Kudos
Message 7 of 20
(4,508 Views)
tikus,
I'm havig a hard time reproducing this in 8.20. My procedure is as follows:
1. Open a blank vi.
2. Put down a combo box
3. Right click on the combo box and select Advanced>>Customize.
4. Change to a strict Type Def.
5. Add three items (a, b, c).
6. Save the type def.
7. Close and when prompted replace the original with your new type def.
8. Save the vi that contains the new type def.
9. Reopen the type def by right clicking the combo box and selecting "open type def".
10. Add another item "j".
11. Close and save the type def.
 
What happens when you follow this procedure?
 
Chris C
 
0 Kudos
Message 8 of 20
(4,488 Views)
Hi, thanks for trying to replicate the problem.

The problem only affects combo-box constants on the block diagram, not controls on the front panel. In your case, try converting the control into a constant on the block diagram, and repeat adding items or modify the type def. You will find that the constant is not updated with the new type def.

To work around this bug, I use enums instead of combo-box. When I want to extract the string value of the enum, I use the 'Format into String' function. It works nicely.


0 Kudos
Message 9 of 20
(4,481 Views)
tikus,
 
Ah! I was able to reproduce the problem with the following steps:
 
1. Open a blank vi.
2. Put down a combo box
3. Right click on the combo box and select Advanced>>Customize.
4. Change to a strict Type Def.
5. Add three items (a, b, c).
6. Save the type def.
7. Close and when prompted replace the original with your new type def.
8. Change the combo box type def to a constant.
9. Reopen the type def
10. Add items (1, 2, 3).
11. Save and close the type def. Note that the constant was NOT updated.
12. Change the constant to a control. Note that the control now reflects the changes to the type def.
 
This was reported to R&D (439C3E3U) for futher investigation. Thanks for bringing this to our attention again!
 
Chris_C
 
 
0 Kudos
Message 10 of 20
(4,464 Views)