You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Behavior:
When decomposing a variant containing an array of variants into an array of variants with the function "Array to Array of VData", the elements are automatically unwrapped from their variant, so instead of having an array of variants containing each a variant, I have an array of variants with the contained type directly.
Problem:
Now I have an array of variants with heterogeneous contained types, so I cannot apply the reverse operation with function "Array of VData to Array". I have to wrap each element back in a variant first, then use the reverse function.
This behavior differs from the similar function for clusters, which, when decomposing a cluster of variants into an array of variants, effectively gives the correct "Variant" type (the elements are not unwrapped from their variant).
Explanation:
This is because "Array to Array of VData" internally uses the native function "Variant to Data", which naturally unwraps variants, while "Cluster to Array of VData" implements its own parsing method, which strictly preserves data types.
Proposed solutions:
Align the behavior of "Array to Array of VData" with the function "Cluster to Array of VData", meaning strictly preserve data types of the elements.
If modifying the current behavior is too dangerous for applications relying on the current behavior, could we imagine adding an option on the function to choose to not unwrap the variants?
It would be the TRUE symmetry of VI "Array of VData to VArray", which could be also renamed "Array of VData to 1D VArray".
Also, the new VI would output the array name and element data type to facilitate decomposition / recomposition of the array. Example:
Additional bug:
To make the new VI work, the subVI "Get Default Data from TD" :
should also be corrected to implement the variant case (should give a "Void" variant wrapped in the variant output instead of throwing an error).
Behavior:
When decomposing a variant containing an array of variants into an array of variants with the function "Array to Array of VData", the elements are automatically unwrapped from their variant, so instead of having an array of variants containing each a variant, I have an array of variants with the contained type directly.
Problem:
Now I have an array of variants with heterogeneous contained types, so I cannot apply the reverse operation with function "Array of VData to Array". I have to wrap each element back in a variant first, then use the reverse function.
This behavior differs from the similar function for clusters, which, when decomposing a cluster of variants into an array of variants, effectively gives the correct "Variant" type (the elements are not unwrapped from their variant).
Explanation:
This is because "Array to Array of VData" internally uses the native function "Variant to Data", which naturally unwraps variants, while "Cluster to Array of VData" implements its own parsing method, which strictly preserves data types.
Proposed solutions:
Align the behavior of "Array to Array of VData" with the function "Cluster to Array of VData", meaning strictly preserve data types of the elements.
If modifying the current behavior is too dangerous for applications relying on the current behavior, could we imagine adding an option on the function to choose to not unwrap the variants?
See attached the VI created with LV2020-32bit:
[LV2020] OpenG Array to Array of VData Unwraps Variants.zip
Regards,
Raphaël.
The text was updated successfully, but these errors were encountered: