05-06-2014 03:31 PM
I've created a cluster constant on a block diagram, then converted it to a typedef and saved it as a .ctl file. I need to edit the typedef to change several of the values. When I open the .ctl file in LabVIEW, I can change the values of interest, but when I save the file, the changes are silently discarded. What am I doing wrong? (Example attached.)
Thank you!
05-06-2014 03:52 PM
I just answered my own question (I think) - the key is to change the values, then make these the default values, then save the .ctl file. This seems to work.
05-06-2014 03:52 PM
Change the values in the diagram constant, not in the typdef.
05-06-2014 03:53 PM
OK, so you wanted to have specific default values. This was not clear from your first post.
05-06-2014 04:33 PM
Editing the values and making them the defaults allows the control to be saved, then closed, and the new values then show up in the control when it's loaded next time. But the changes still don't show up where the constant is used in the block diagram. The connector in the diagram has "auto-update from typedef" checked - this doesn't seem to matter. If I uncheck "view cluster as icon" in the block diagram, the values that show up in the resulting expansion are the original unchanged values, even though the values in the control are the new changed values. How does one go about making the block diagram values sync up with the control values again?
(The reason for using a typedef in the first place was so that changes like this would automatically propagate to the multiple places (VIs) where these constants are used. Whatever is going on here seems somewhat counterintutive.)
05-06-2014 04:35 PM
You should be aware though that the default values will only be applied to the .ctl file itself and any constants created after you saved the defaults. Also, changing the default values on the typedef will not change the values of any existing constant or control of this typedef.
05-06-2014 04:40 PM
Thank you, Mark - I believe I can work with this by replacing each existing instance of the constant with a new instance of the (updated) typedef. This will get the job done!