LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What's the intended way to create a strictly typed class specifier constant?

Accessing certain properties/methods of controls requires a strictly typed reference. You can get this within the same vi e.g. by creating a static reference ("create -> reference" from the context menu of that control) or a directly linked property/invoke node. However, that's not possible across vi boundaries, so one has to use a vi reference to get the particular control reference and then typecast the strict type via "to more specific class":

strict.png

My question is: How to do that properly or the "intended" way? You can get the class specifier constant form the "application control" menu and browse all the classes, but there seems to be no way to make it "strict". The way I do it is creating a static reference to the original control in the original vi (or copying that control into this vi and creating the reference) and then right-clicking on the static reference and choosing "create -> constant":

constant.png

 

This way I will get a strictly typed class specifier constant which is not tied to a specific control (like the one in the first screenshot), but this method seems extremely inelegant. What's the proper way to make a class strict?

0 Kudos
Message 1 of 3
(918 Views)

To create a stric Type Def for the waveform chart follow the the following steps : 

Right click the waveform chart -> Make type Def -> Open Type Def ->  in the control Type select Strict Type Def -> Save your control .

 

Emna20_0-1653215128042.png

 

0 Kudos
Message 2 of 3
(882 Views)

I don't know of any other way to do it.

If you're adventurous, you could make your one shortcut menu plugin.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 3
(850 Views)