From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cluster constant typedef cannot be edited?

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!

 

0 Kudos
Message 1 of 7
(2,858 Views)

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.

 

0 Kudos
Message 2 of 7
(2,845 Views)

Change the values in the diagram constant, not in the typdef.

0 Kudos
Message 3 of 7
(2,844 Views)

OK, so you wanted to have specific default values. This was not clear from your first post.

0 Kudos
Message 4 of 7
(2,840 Views)

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.)

 

0 Kudos
Message 5 of 7
(2,826 Views)

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.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 6 of 7
(2,825 Views)

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!

 

0 Kudos
Message 7 of 7
(2,817 Views)