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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple text ring sharing same items

Solved!
Go to solution

I'd like to have multiple text rings, all having the same list of item/value pairs. How do I do that? While I can copy the same text rings it'd very bothersome if I want to update the list. I have not been successful in Googling for this.

 

Thank you very much.

0 Kudos
Message 1 of 6
(2,916 Views)

Ideas:

  • Use an Enum instead?
  • Wire a constant array of strings to the Strings[] property node for all the rings.
0 Kudos
Message 2 of 6
(2,906 Views)

I'd go with an enum.

 

But if the list has to be dynamic, create an array references of the rings and use a FOR loop to update the items.


GCentral
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 3 of 6
(2,892 Views)

I thought enum is the same as text ring except it doesn't allow customized Values (always sequential from 0)

http://digital.ni.com/public.nsf/allkb/79BA4505AE8C755E86256FB2000140B0

And even when I tried that I still don't see a way to share the list.

 

I think what I want is closer to Type Def. But when I tried that I noticed even when I update my .ctl, the control that uses is is not update accordingly.

0 Kudos
Message 4 of 6
(2,854 Views)
Solution
Accepted by topic author jbphili

If you make a type def enum, then every control that is linked to that type def will have the exact same list.  If you make a type def ring, they will not.  If you make a Strict Type Def ring, then they will have to look exactly the same, but they will have the same list.

 

What exactly are your requirements?  What are you trying to do with these controls?  Is the list dynamic (can change at runtime)?


GCentral
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 5 of 6
(2,841 Views)

I'll try the strict type def ring.

 

I want non-sequential values to control scaling of waveform chart. I have multiple waveform charts so I need multiple of those ring sharing the same list of scaling factors. No run time changes needed.

 

Thanks.

0 Kudos
Message 6 of 6
(2,830 Views)