LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I make a table as a typedef or strict typedef, so that when I change the table at one place, all the same table at other places change too, like Enum typedef.

Hi there,

How can I make a table as a typedef or strict typedef, so that when I change the table at one place, all the same table at other places change too, like Enum typedef.

Thank you very much,

Steve

0 Kudos
Message 1 of 6
(1,911 Views)

It depends on the LabVIEW version. In LV 2017, for example, you simply right click and choose Make Type Def ... in one place. If you already created other tables, you need to replace all of them with the new defined type.

Of course, you want to make it a Strict Type Def, to preserve properties such as color, size, headers and so on. Making a table a simple Type Def is not much useful, since there is only one possible data type associated.

Beware that with a Strict Type Def all control properties are the same for all instances.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 6
(1,888 Views)

Thank you. I am using LabVIEW 2015. It seems that it does not work. Do you know whether LabVIEW 2015 works?

Regards,

Steve

0 Kudos
Message 3 of 6
(1,879 Views)

Obtain a reference to the table.  That is what you need.

 

.

0 Kudos
Message 4 of 6
(1,878 Views)

@Shijie  ha scritto:

Thank you. I am using LabVIEW 2015. It seems that it does not work. Do you know whether LabVIEW 2015 works?

Regards,

Steve


Right-click, then select Advanced -> Customize...

A Custom control window will appear. Change the ctl type on the toolbar from Control to Strict Type Def.

Modify (if needed) and Save the new Custom control, then close it. LabVIEW asks you if you want to replace the original control with the Custom control. Click Yes.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 6
(1,866 Views)

Try this, works for all versions:

Select the table, from menu bar, Edit => Customize Control... => on the toolbar of the new window, change Control to Type Def., or Strict Type Def. => save the Typedef to a file.

 

George Zou
0 Kudos
Message 6 of 6
(1,865 Views)