This test returns a failure for any cluster constant with a default data type value, that is not set to "View Cluster As Icon":
If a cluster constant has the default value for its data type, it should be set to "View Cluster As Icon" to save on block diagram space.
This test is saved in LabVIEW 2016. Follow the instructions here to install and use this test.
Hi Darren, I know this is a very old post, but I stumbled upon using this test in one of my VIs and found an issue. Using a "Diagram Disable structure" to get the default value of a variant will not work.
The default value will always be an "Empty Variant" whereas, the default value of a cluster in variant form will be the default value of individual elements in the cluster.
In order to check the default value of a cluster, which comes as variant, we have to get references of all the individual elements within the cluster, identify its type and get the default value.
I am not sure are there any other best ways to do these. Please share if any
Good catch, I don't know how that code ever worked. 😛 I've published an updated version that creates a dummy constant (with default value) to compare against. This one seems to work.