http://forums.openg....?showtopic=1088
Basically, for some data types, the variant name from the input is propagated from the variant input, and for some other data types it is not propagated.
The use of the LV node "To Variant" creates a variant with a standard name (the name of the input wire, ie no name or sometimes "value").
example: Integers I8..I32
The same is true for [U8..U32], [SGL..EXT], [CSG..CXT], [Boolean], [String, DAQ], [Path]
The other data types: [Enum U8..Enum U32], [SGL PQ..EXT PQ], [CSG PQ..CXT PQ], [Array] and [Cluster] seem to propagate the variant name. I have not tested the vis, but by looking at the code it looks like it.
example:
I see 2 possible fixes:
1: using the OG SetDataName function:
2: using the NI FlattenedStringToVariant primitive and the TD of the input variant. This is the same that is used fo the PQ data types ([SGL PQ..EXT PQ] and [CSG PQ..CXT PQ]).
Solution 2 might be faster because the proper variant is created in one operation. In solution 1, the variant is first created and then modified. Anyone has an opinion on this?
How can this fix be integrated in a future release of the package? Can I help?
And by the way thanks again for these great tools!
BaB
-------------------------------------------------------------------------------------------
(I wanted to write the following as separate post but using reply just merges the reply with the original post... strange....)
As a side effect of the fix above, the Cluster case could be modified:
When the vi propagates the data names for all data types, there is no need to explicitly set the name again after the recursive call.
A second note is that the Cluster Name can be set directly with the optional input to the "Array of VData to Cluster" function, and the last SetDataName function to the right could be removed too.
Edited by Bab, 18 October 2011 - 09:54 AM.












