LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

programmatically filling text rings

Do you want to change the items or TextRing2 to a different list depending on what's selected in TextRing1? Like a subfolder?

 

In my example it's easy to add, in the value change event, have your lists in a case structure, and depending on what TextRing1 is, send the appropriate list to the Items[] property of TextRing2

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 11 of 18
(1,079 Views)

yes i want to change TextRing2 to a different list depending on what's selected in TextRing1. Yes it shall behave like a subfolder. But the problem is that i want to change constants from the host vi and not controls, so that i have automaticcally the right values in text ring 2 constant, when i change the value of text ring 1 constant in the host vi.

0 Kudos
Message 12 of 18
(1,074 Views)

Looking at your code and rereading your posts, you want to change a control in the main vi from the sub-vi? Just send a control ref to the sub-vi and you can change it from inside the sub-vi via properties.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 13 of 18
(1,066 Views)

Hello Y, I have post already the two VIs in Post 7 of this discussion.

Thanks.

0 Kudos
Message 14 of 18
(1,060 Views)

I noticed that, that's why i edited my post. You must have managed to answer in the mean time. 🙂

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 15 of 18
(1,051 Views)

🙂 I want to change the strings in a combo box control constant placed in the main vi in dependence of a string which i select from a second combo box control constant in the main vi. To control this functionality the sub vi shall be used. I hope you understand what i want to do now.. 🙂

0 Kudos
Message 16 of 18
(1,045 Views)

Diagram constants are just that: constants! Since they don't even show up in the main program front panel, they are irrelevant to the users. You don't even need them.

 

All you need to do is populate the second control according to the state of the first control when the subVI starts and before waiting for user input. This can be easily done with a few modifications of the code that you already have. All relevant code belongs into the subVI!

 

(If you still insist of doing it the Rube Goldberg way, you can modify my code and hide the controls on the main vi. (right-click terminal...hide control))

0 Kudos
Message 17 of 18
(1,043 Views)

A text ring's data type is an integer.  Why can't you just pass around the integer?  Or you can use the Ring Text.Text property to get the visible string.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 18 of 18
(1,040 Views)