01-06-2022 02:08 PM
Greetings. i m a newbie to labview. I just went through a program .In it they have created a .CTL file which only consists of only one Enum control. And in several other VIs in the project , they have called the .ctl file in the block diagram itself. I was searching for how to insert a .ctl file into a VI but found no solutions? So can anyone please explain how to insert a .ctl file into a VI?
Note: also can anyone explain what differentiates .ctl file from other functions?
Solved! Go to Solution.
01-06-2022 02:29 PM
Just drag the ctl file from the project window or Windows Explorer onto the block diagram.
A ctl file just defines a default look for a control and/or a data type. In the case of the enum, you should be defining a data type. By defining the enum in a ctl file, if you need to add/remove items from the enum, everywhere that type def is used will get updated instead of you needing to go through all of your code and update the enums individually (which I did have to do when I was a LabVIEW newbie).
My general advice is that every enum and cluster should be a type def. Granted, there are a lot of people here (myself included) who will argue that a type def cluster is usually better as a class, but that is an argument for another day.
01-14-2022 03:03 AM
Thnx crossrulz for the reply and it did work well..finally u have mentioned to use cluster as def.type instead of class..i can't get it??if u don't mind can u explain a little bit elaborately?
01-14-2022 05:34 AM
Actually, he said the opposite, but a complete discussion would probably be too much for a newbie.
Also, you should mark as a solution crossrulz's post, not yours.