LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the property the same between two controls?

Is it possible to assign all the property nodes of one control to the other?

 

0 Kudos
Message 1 of 20
(3,252 Views)

It is possible ... provided that the controls are the same type you can simply link all properties from one control to the other, apart from the read only properties. The image shows all string properties with the 'linkable' ones connected. Certainly not very elegant though ! Do you really need to copy all properties ?

 

All props.JPG

 

 

 

0 Kudos
Message 2 of 20
(3,235 Views)

one read and other write

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 3 of 20
(3,227 Views)

Hi William,

 

you could configure your first control and then create a copy of that control to duplicate it with all properties…

 

You also might create a strict typedef from your control and use that one…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 20
(3,222 Views)

Gerd raised an interesting point ...

 

Do you need to do this as a one off copy or do you need this to happen dynamically in your program ?

 

0 Kudos
Message 5 of 20
(3,215 Views)

Hi, NeilR,

 

Wow, there is a lot of work to do it, say I have ten string controls or more, how can I do Q_Q...

 

 

0 Kudos
Message 6 of 20
(3,190 Views)

Hi, Ranjeet Singh,

 

Do you mean the same with NeilR? I have a lot of controls...

0 Kudos
Message 7 of 20
(3,181 Views)

Hi William,

 

you can use the references of those controls instead of creating a property node for each of them…

 

Still you don't tell the reason for copying the properties nor did you answer on that "strict typedef" suggestion!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 8 of 20
(3,176 Views)

Use references to however many strings you wish to copy to, combine them into an array and then pass that into a for loop.

 

 

multi.jpg

0 Kudos
Message 9 of 20
(3,170 Views)

Hi, GerdW,

 

I'd like to assign or dynamically synchronize these two controls.

Hmm.. I think copying is not the one...

0 Kudos
Message 10 of 20
(3,165 Views)