LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to make the property the same between two controls?

Hi William,

 

you should also keep in mind you cannot copy all properties of a string control: when the string is formatted in several styles using selections you will have a hard time to copy that by just reading properties...

Best regards,
GerdW


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

Yes, I'd like dynamically synchronize the controls. In fact, I'd like to call the external object to update the control.

Since the config file and binary file are only output values, and read only values, I hope there is a way to include the property!!!

0 Kudos
Message 12 of 20
(1,046 Views)

Hi William,

 

you really should explain what you're writing here…

 

Which external object do you reference?

What config and binary files?

Which "only output" and "read only" values?

Which "property" do you want to include? Where do you want to include a property?

How is all that related to string controls?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 20
(1,042 Views)

Hi, GerdW,

 

I'd like programming the control, as I mentioned in last article, I'd like to not only reconfigure the value of the controls in my UI, but also the property of the controls in my UI.

For example, my UI has some listboxes with some symbols, and some enums with some item names, those symbols and item names are possible altered while executing the program. I hope the property can reload in next execution. As a result, I really need programming, not manually copying..

0 Kudos
Message 14 of 20
(1,036 Views)

Hi William,

 

you cannot alter enums at runtime! Use rings instead…

 

For all the remaining properties you should use generic property nodes along with control references, as described above.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 20
(1,032 Views)

Hi, NeilR,

 

My case is like I have string 1, 2, ...,10, each string control need to assign to new string control.

String Control 1 -> String Control 1'

String Control 2 -> String Control 2'

.

.

.

String Control 10 -> String Control 10'

There is still a lot of work for me to complete it Q_Q...

0 Kudos
Message 16 of 20
(1,030 Views)

Hi, GerdW,

I know not all the property can be write, what do you mean "string is formatted in several styles using selections"?

Do you mean the font of the string?

I think we have gone far from my original question.

Let me try to make the question concrete and simple.

I have some enums, and it is possible for me to alter the item names of these enums and choose which items I selected while execution.

When next execution starting, these enums should be represented as the new item names modified last time.

It let me want to know how to update, to assign the property of the controls.

You may say why not just write the item names as a key of config file,

Yes it can be, but not the general usage for me.

If I have other controls, such as disable property of something else, I'll ask why not find a way to assign one control to the other, maybe I a little lazy...XD...

0 Kudos
Message 17 of 20
(1,020 Views)

Hi William,

 


it is possible for me to alter the item names of these enums and choose which items I selected while execution.


 

No, you CANNOT alter item names in enums WHILE execution!

 


It let me want to know how to update, to assign the property of the controls.


 

You don't assign properties to controls, you read or write them.

 

I still don't understand your task description…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 18 of 20
(1,015 Views)

Sorry, that's my mistake to the enums, let's take the listboxes instead of enums in the example.

To write/read the property is OK, but it is a much work.

Sorry to my poor description, let me try to explain detailedly,

I have a ListBox Control as attached.

The Item names are A, B, C, D, E, F, G.

The Item symbols are [1, 0 , 1, 0, 0, 0, 0]

The Value are [1, 5]

The Disable Item are [3]

I have these properties of the ListBox and alter these properties while execution.

Say the Item symbols are changed to [0, 0 , 1, 0, 0, 1, 0], and Disable Item are change to [0, 1].

I hope these property values can be hold when starting next execution.

So I can use the config toolkit, write Item names, Item symbols, values, disable items to a config file.

When next execution started, read the config file previously and assign or write these property values to the listbox of the UI.

That is what I mean not only output the values of the control, but also output the property values of the controls.

Is there other easier way to re-configure the property values?

I still wonder I cannot make one control the same with the other without wiring all the property nodes...

 

0 Kudos
Message 19 of 20
(1,006 Views)

Hi William,

 

usually you don't rely on some controls (and their properties) when it comes to store/read/manage all those properties.

You keep them in a datastructure of your own, maybe in a FGV (functional global variable aka ActionEngine)!

 

Using that approach it becomes very easy to apply properties to several controls, to store them to a file or to load them from a file. All the functionality is in the FGV. To set a control you only need to call the FGV with a refnum of that control!

Best regards,
GerdW


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