Jump to content
News about the LabVIEW Wiki! Read more... ×
Sign in to follow this  
Taylorh140

Variant Array to Cluster Xnode

Recommended Posts

After working on the set cluster element by name xnode, it made me realize i could use the same concept to convert a variant array to a cluster. The technique is actually pretty simple, the xnode generates a case structure for each element in a cluster in cluster order, wherein a bundle by name is used to set the value and an unbundle by name is used to get the type, a variant to data is used to convert the data. This has some benefits over some methods, you are not limited to 255 elements, although that is not usually the case some of us are paranoid that clusterosaurus giganticous will be larger than expected. It also has a draw back :o that is that when converting from a variant array all the elements must have unique, non-blank names, and this is usually the case. 

I think this technique (though very brute-force) might be useful for some other things let me know what you guys think.

Capture.PNG

VariantArrayToCluster.zip

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

By using this site, you agree to our Terms of Use.