What is a type definition and how do I create one?

A type definition or a strict type definition is a custom control or indicator linked to a saved file (with extension *.ctl). When you save a custom control or indicator as a type definition, any data type changes you make to the type definition affect all instances of the type definition in all the VIs that use it. When you save a custom control or indicator as a strict type definition, any data type and cosmetic changes you make to the strict type definition affect all front panel instances of the strict type definition.

You can create a type definition from an existing front panel control or indicator by right-clicking on it and selecting Make Type Definition. That step appears to do nothing but it will create a new untitled control file that you will need to edit and save into your project.

To edit the type definition you can again right-click on the control and select Open Type Definition.

From the control editor you can select whether you want to have a type definition or a strict type definition from the drop-down menu as shown.

A control or a constant that has been associated with a type-definition will have a black triangle on its icon as shown.

More info from NI…
Print Friendly, PDF & Email