<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Iterating through unknown cluster attributes in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297943#M964483</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to write a VI that revieces an unkown cluster (it should work with any cluster) and iterates through it's attributes,&lt;/P&gt;&lt;P&gt;for each attribute I execute different commands depending on the type.&lt;/P&gt;&lt;P&gt;I have tried to work with variants but I couldn't get the actual values of the cluster attributes (only type and name).&lt;/P&gt;&lt;P&gt;What would you recommend using for a VI like that?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Fri, 20 May 2016 11:17:25 GMT</pubDate>
    <dc:creator>Guym142</dc:creator>
    <dc:date>2016-05-20T11:17:25Z</dc:date>
    <item>
      <title>Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297943#M964483</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm trying to write a VI that revieces an unkown cluster (it should work with any cluster) and iterates through it's attributes,&lt;/P&gt;&lt;P&gt;for each attribute I execute different commands depending on the type.&lt;/P&gt;&lt;P&gt;I have tried to work with variants but I couldn't get the actual values of the cluster attributes (only type and name).&lt;/P&gt;&lt;P&gt;What would you recommend using for a VI like that?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 11:17:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297943#M964483</guid>
      <dc:creator>Guym142</dc:creator>
      <dc:date>2016-05-20T11:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297946#M964484</link>
      <description>&lt;P&gt;I am not sure if your question makes sense for LV. You are aware that a cluster is container for elements which defined&amp;nbsp;during edit time, but static for execution? That means that you cannot&amp;nbsp;encounter "an unknown cluster" in your application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That being said, i assume that you try to create a flexible data type which can have different configurations of elements (not attributes!).&lt;/P&gt;
&lt;P&gt;My feeling is that you are essentially looking for LVOOP, however, you have to implement all kinds of possible data structure setups beforehand.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The question implies that you store everything in variants currently and use variant attributes to extend the data set. This is unique to variants (unless looking into some custom data frameworks). What is your motiviation to get away from that if you look for exactly this flexibility?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Norbert&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 11:22:52 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297946#M964484</guid>
      <dc:creator>Norbert_B</dc:creator>
      <dc:date>2016-05-20T11:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297948#M964486</link>
      <description>&lt;P&gt;Hi Guym,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Why is the cluster "unknown" to your VI?&lt;/P&gt;&lt;P&gt;- What are "attributes" of the cluster? Clusters have elements and properties, variants have attributes…&lt;/P&gt;&lt;P&gt;- What is the "type of the attribute"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;I have tried to work with variants but I couldn't get the actual values of the cluster attributes (only type and name).&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;So you already got the "attribute type and name"? What else do you need according to your description?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you see your message raises more questions as we can answer!&lt;/P&gt;&lt;P&gt;Please provide an example (VI!) and explain as best as possible, what you really want to achieve!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;You see Norbert has the very same questions on your post than me. Guess why…&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 11:24:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297948#M964486</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2016-05-20T11:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297968#M964495</link>
      <description>&lt;P&gt;It appears that I didn't describe the problem correctly.&lt;/P&gt;&lt;P&gt;I will start from the beggining,&lt;/P&gt;&lt;P&gt;I have a few statecharts and each of them has an output cluster which contains data about it's internal operations.&lt;/P&gt;&lt;P&gt;I want to take this cluster and send&amp;nbsp;it's &lt;STRONG&gt;elements&lt;/STRONG&gt; (sorry&amp;nbsp;for that) through network&amp;nbsp;tables. (The actual sending is not the problem)&lt;/P&gt;&lt;P&gt;The problem is that the VIs that send the data are each for a specific type so I need to unbundle the cluster and send them one by one depending on the type of each element.&lt;/P&gt;&lt;P&gt;I thought that it would be very nice to have a vi that can handle any type of cluster and just send the elements by their name.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My lastest try was to convert the clusters to variants and go on from there but the actual values get lost in the way (I guess I don't understand what variants are supposed to do).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If it helps I have a type definition for each of those clusters, but I'm looking for a generic solution so that it would send any new element that is added to the cluster without any special care to the sending VI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 12:07:27 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297968#M964495</guid>
      <dc:creator>Guym142</dc:creator>
      <dc:date>2016-05-20T12:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297984#M964500</link>
      <description>&lt;P&gt;One of the reasons it is so helpful (for us to help you) to have you post code is it tells us (among other things) what Version of LabVIEW you are using. &amp;nbsp;In LabVIEW 2015, for example, in the Variant Palette is the Get Cluster&amp;nbsp;Information&amp;nbsp;function that returns an Array of Variants for the elements in the Cluster. &amp;nbsp;You can use Get Type Information on this Array to get the Types of all of the Cluster Elements, as well as their Names and whether or not they have an associated Type Def.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have an earlier Version of LabVIEW (I don't think this was in LabVIEW 2014), see if Hidden Gems in VILib is available for your LabVIEW Version on the NI Tools Network -- it provides access to these "hidden" functions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bob Schor&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 12:44:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297984#M964500</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2016-05-20T12:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297987#M964501</link>
      <description>&lt;P&gt;I do have LabVIEW 2015 and I have tried to use the VI you mentioned but I couldn't get the values of the elements with it.&lt;/P&gt;&lt;P&gt;I have attached the code,&lt;/P&gt;&lt;P&gt;I get the right name of the element but the value is always zero,&lt;/P&gt;&lt;P&gt;when probing I noticed that the "Get cluster Information" doesn't pass the values and resets every value to default.&lt;/P&gt;&lt;P&gt;Is there a way to use the original variant in order to get the original value?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 12:52:28 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297987#M964501</guid>
      <dc:creator>Guym142</dc:creator>
      <dc:date>2016-05-20T12:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297990#M964503</link>
      <description>&lt;P&gt;I think I have manged to make a working solution using refrences,&lt;/P&gt;&lt;P&gt;Can you please take a look and tell me if this is the right way to do it? Is there a way to make it more "clean"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the caller vi I make an indicator of the cluster and then create a refrence to it, this is passed to the vi for processing.&lt;/P&gt;&lt;P&gt;both are attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank&amp;nbsp;you&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 13:02:11 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3297990#M964503</guid>
      <dc:creator>Guym142</dc:creator>
      <dc:date>2016-05-20T13:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3298022#M964509</link>
      <description>&lt;P&gt;You may want to&lt;A href="https://ni.lithium.com/t5/LabVIEW/Nugget-Using-control-references/m-p/570756#M267659" target="_self"&gt; review this Nugget &lt;/A&gt;and the thread that follows that Nugget.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That Nugget was written for LV 8.2 but in theory should still be valid. It ws written prior to the new addtions mentioned above to query cluster elemements. The follow-up posts also suggests alternative add-ons you can use.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the network comm is between LV applications, VI Server will allow invoking a target VI on one from a VI running on another node. In that case the work required to transfer the cluster contents is built into LV and we do not have to deal with changes to the data structures when code is updated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 13:37:47 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3298022#M964509</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2016-05-20T13:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3298042#M964516</link>
      <description>&lt;P&gt;Maybe this will help&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 14:01:15 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3298042#M964516</guid>
      <dc:creator>paul_cardinale</dc:creator>
      <dc:date>2016-05-20T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3298237#M964598</link>
      <description>&lt;P&gt;Sorry I didn't get back to you earlier (work intruded).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By now, you've probably figured out how to use the 2015 Variant functions to learn the Type of each Cluster element and the Name of the Element. &amp;nbsp;Just in case, here's a snippet:&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/8566d8e0a2c883bc9298ca8fa37fbe4e4fcdc60a/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31383338313069393441303643464442453943304534412f696d6167652d73697a652f6f726967696e616c3f763d76322670783d2d31" border="0" alt="Cluster Explorer.png" title="Cluster Explorer.png" /&gt;&lt;/P&gt;&lt;P&gt;If you now want to get the&amp;nbsp;&lt;U&gt;value&lt;/U&gt; of each Cluster element, you need to be able to deal with the fact that each element may be a different&amp;nbsp;&lt;U&gt;type&lt;/U&gt;, so your output will need to be something that is "type-invariant", such as a Variant or a string representation. &amp;nbsp;Your PNG (oooh, I&amp;nbsp;&lt;U&gt;hate&lt;/U&gt; "pictures" of code -- why not post a Snippet, which is at least executable, or the VI itself?) shows you are more-or-less on the right track.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it isn't simple -- there are about forty different Types in the Type Enum. &amp;nbsp;I presume you know that if you wire an Enum to a Case selector, you can tell the Case Statement to "Add Case for Every Value" and auto-populate the Case choices, right? &amp;nbsp;Then it is simply a matter of putting 40 or so Variant to Data functions and doing something with the 40 different values that are allowed.&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/cf952a34eae37eda39f330005ae25625703b2773/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31383338313169313743344232414230363939413145302f696d6167652d73697a652f6f726967696e616c3f763d76322670783d2d31" border="0" alt="Variant Decode.png" title="Variant Decode.png" /&gt;&lt;/P&gt;&lt;P&gt;Bob Schor&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 19:39:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3298237#M964598</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2016-05-20T19:39:24Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3299870#M965314</link>
      <description>&lt;P&gt;Hello there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;@Bob_Schor - is it possible that your second snippet will&amp;nbsp;eventually not work? The&amp;nbsp;Get Cluster Information vi does not return the &lt;EM&gt;elements&lt;/EM&gt; of the clusters but only an array containing&amp;nbsp;the &lt;EM&gt;data types&lt;/EM&gt; of the elements (according&amp;nbsp;to the &lt;A href="http://zone.ni.com/reference/en-XX/help/371361M-01/glang/get_cluster_information/" target="_blank"&gt;description&lt;/A&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been tackling a similar problem for some time&amp;nbsp;and managed&amp;nbsp;to find&amp;nbsp;a solution in this (old) post:&amp;nbsp;&lt;A href="https://decibel.ni.com/content/docs/DOC-10524" target="_blank"&gt;https://decibel.ni.com/content/docs/DOC-10524&lt;/A&gt;&amp;nbsp;which&amp;nbsp;enabled me even to manage arrays within my&amp;nbsp;(unknown) input cluster (I am&amp;nbsp;still working on LV 2014 where the variant VIs are indeed hidden gems).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But&amp;nbsp;then I bumped&amp;nbsp;into a problem: what if the cluster contains another &lt;EM&gt;cluster&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;With respect to the data type I can easily account for that by using a "cluster" case and extract the&amp;nbsp;necessary information about my sub-cluster elements with the get type&amp;nbsp;info vi.&lt;BR /&gt;But how do I get down to the &lt;EM&gt;values&lt;/EM&gt; of the cluster within the cluster? The above method won't work - unless the 2015 version of the get info vi works differently (which I doubt).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be honest: I&amp;nbsp;am rather curious about the issue than aching for a solution. I should be able to&amp;nbsp;solve my specific problem with the XML-strategy mentioned above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I still have the feeling, I'm missing out on a rather simple answer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 May 2016 23:52:20 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3299870#M965314</guid>
      <dc:creator>Sheepyhollow</dc:creator>
      <dc:date>2016-05-24T23:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300142#M965408</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/306984"&gt;@Sheepyhollow&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hello there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/95728"&gt;@Bob_Schor&lt;/a&gt; - is it possible that your second snippet will&amp;nbsp;eventually not work? The&amp;nbsp;Get Cluster Information vi does not return the &lt;EM&gt;elements&lt;/EM&gt; of the clusters but only an array containing&amp;nbsp;the &lt;EM&gt;data types&lt;/EM&gt; of the elements (according&amp;nbsp;to the &lt;A href="http://zone.ni.com/reference/en-XX/help/371361M-01/glang/get_cluster_information/" target="_blank"&gt;description&lt;/A&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;Oops! &amp;nbsp;You are absolutely correct. &amp;nbsp;There is a solution (which I've successfully used, but&amp;nbsp;&lt;U&gt;assumed&lt;/U&gt; the afore-mentioned "native LabVIEW function" replaced -- shame on me for not testing thoroughly. &amp;nbsp;In the NI Tools Network, the OpenG set of Tools, particularly OpenG LabVIEW Data Library, contains several functions that you can use for this purpose, including Get Cluster Element by Name and Cluster to Array of VData, which is what I thought the LabVIEW function was more-or-less doing.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been tackling a similar problem for some time&amp;nbsp;and managed&amp;nbsp;to find&amp;nbsp;a solution in this (old) post:&amp;nbsp;&lt;A href="https://decibel.ni.com/content/docs/DOC-10524" target="_blank"&gt;https://decibel.ni.com/content/docs/DOC-10524&lt;/A&gt;&amp;nbsp;which&amp;nbsp;enabled me even to manage arrays within my&amp;nbsp;(unknown) input cluster (I am&amp;nbsp;still working on LV 2014 where the variant VIs are indeed hidden gems).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But&amp;nbsp;then I bumped&amp;nbsp;into a problem: what if the cluster contains another &lt;EM&gt;cluster&lt;/EM&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Ah, recursion, always a lot of fun. &amp;nbsp;Basically, if you have a function called "Take Apart Cluster" that "does the right thing" by taking apart the elements of a Cluster and returning, say, a flat Array of text that describes the Cluster, what do you do when an element&amp;nbsp;&lt;U&gt;is&lt;/U&gt; a Cluster? &amp;nbsp;Why, you pass that (sub-) Cluster to "Take Apart Cluster", i.e. you make the function&amp;nbsp;&lt;U&gt;call itself&lt;/U&gt;. &amp;nbsp;To implement this in LabVIEW, you need to make the function Reentrant. &amp;nbsp;If you haven't worked with Reentrant functions or recursion before, it can be a little mind-bending, but it does work and can solve problems such as this.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To be honest: I&amp;nbsp;am rather curious about the issue than aching for a solution. I should be able to&amp;nbsp;solve my specific problem with the XML-strategy mentioned above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;Indeed, an XML parser needs to be recursive ...&lt;/FONT&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Bob Schor&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 13:35:46 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300142#M965408</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2016-05-25T13:35:46Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300350#M965490</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/95728"&gt;@Bob_Schor&lt;/a&gt; wrote:&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;In the NI Tools Network, the OpenG set of Tools, particularly OpenG LabVIEW Data Library&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Bob Schor&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN&gt;Yes, that's where most suggestions lead to - I wonder if there is a "native" solution, though.&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Concerning the recursion issue - it won't&amp;nbsp;work with native functions&amp;nbsp;for&amp;nbsp;the same reason as above.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have build&amp;nbsp;a simple (and limited) example and will post this I I have a bit more time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 17:32:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300350#M965490</guid>
      <dc:creator>Sheepyhollow</dc:creator>
      <dc:date>2016-05-25T17:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300364#M965498</link>
      <description>&lt;P&gt;Well, the OpenG functions (which have been around for at&amp;nbsp;&lt;U&gt;least&lt;/U&gt; a decade) all use "native" LabVIEW (though some of the functions might be "hidden" in VI.Lib). &amp;nbsp;I took a look at how Cluster to Array of Variant worked -- they basically flatten the Variant to a String (which contains an internal description of the data) and Type Descriptors (which has the "type" information in some internal LabVIEW format too complex for most of us), then use these to, element by element, convert the particular Element (parsed from the String) to a Variant (using information from the Type Descriptors), resulting in an Array of Variants. &amp;nbsp;A tad messy, and I'm glad I didn't have to dream this up ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bob Schor&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2016 17:56:27 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300364#M965498</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2016-05-25T17:56:27Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300735#M965609</link>
      <description>&lt;P&gt;While risking sounding like a broken record...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THe Nugget I linked above dealt with clusters of arrays of clusters of arrays... used recursion... And only resorted to variants in one situation when I had to figure how large an array was before going back to native LV data types. While I only implemented a lmited number of data types ( the ones I needed) it does expalin how and it ofers a full set of VIs to show how it was done.... back in the day.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 12:27:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300735#M965609</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2016-05-26T12:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300841#M965651</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/306984"&gt;@Sheepyhollow&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;Hello there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/95728"&gt;@Bob_Schor&lt;/a&gt; - is it possible that your second snippet will&amp;nbsp;eventually not work? The&amp;nbsp;Get Cluster Information vi does not return the &lt;EM&gt;elements&lt;/EM&gt; of the clusters but only an array containing&amp;nbsp;the &lt;EM&gt;data types&lt;/EM&gt; of the elements (according&amp;nbsp;to the &lt;A href="http://zone.ni.com/reference/en-XX/help/371361M-01/glang/get_cluster_information/" target="_blank"&gt;description&lt;/A&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;If you use a Variant to Data with Array of Variants as conversion, instead of the current one, data should be retained.&lt;/P&gt;&lt;P&gt;/Y&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 14:32:55 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300841#M965651</guid>
      <dc:creator>Yamaeda</dc:creator>
      <dc:date>2016-05-26T14:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300848#M965655</link>
      <description>&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/ecdbdcfa00ee233ff69ef2417f9b971aa090f56c/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31383430363269333030313737424137463743354231332f696d6167652d73697a652f6f726967696e616c3f763d76322670783d2d31" border="0" alt="Variant.png" title="Variant.png" /&gt;&lt;/P&gt;&lt;P&gt;/Y&lt;/P&gt;</description>
      <pubDate>Thu, 26 May 2016 14:43:41 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300848#M965655</guid>
      <dc:creator>Yamaeda</dc:creator>
      <dc:date>2016-05-26T14:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300856#M965657</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/9539"&gt;@Ben&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;While risking sounding like a broken record...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As long as you don't do these scratchy noises...&amp;nbsp;&lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://ni.lithium.com/i/smilies/16x16_smiley-wink.gif" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are right to point on this Nugget again - I must admit that I started reading and lost track after a while because I was a bit overwhelmed by&amp;nbsp;too many unfamiliar things, there is still a lot of stuff I&amp;nbsp;have not yet played around with..&lt;/P&gt;&lt;P&gt;But I'll give it another try since the initial problem/task you describe is&amp;nbsp;exactly the same that I am dealing with now and it's furthermore adressing several other issues and question that I already came across (and, partly, solved in my way).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I started out on control references&amp;nbsp;in the first place because it is the only way&amp;nbsp;I found to transfer a 'flexible' cluster to another save-data-VI (I don't have&amp;nbsp;fully "arbitrary" clusters because I still can control their content, but I different&amp;nbsp;VIs&amp;nbsp;with different needs).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;Thanks for the reminder!&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Thu, 26 May 2016 14:53:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3300856#M965657</guid>
      <dc:creator>Sheepyhollow</dc:creator>
      <dc:date>2016-05-26T14:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3301822#M966013</link>
      <description>&lt;P&gt;Wow, Yamaeda-san&amp;nbsp;-- using Variant to Data to transform&amp;nbsp;a Cluster to an Array of Variants seems&amp;nbsp;&lt;U&gt;much&lt;/U&gt; simpler than what the equivalent OpenG function does! &amp;nbsp;I'll have to try this to convince myself that it works, but just because you can do something using complex, tricky-to-understand code doesn't mean that "straight-forward and simple" won't work!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bob "Always Learning" Schor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S. -- It really does work! &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;IMG src="https://ip1.i.lithium.com/f1f77b6718038b638c62df70c178ed7bef5066b0/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31383431373669443446303636354545443234463337352f696d6167652d73697a652f6f726967696e616c3f763d76322670783d2d31" border="0" alt="Arrays of Variants.png" title="Arrays of Variants.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2016 16:55:12 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3301822#M966013</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2016-05-28T16:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Iterating through unknown cluster attributes</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3301824#M966014</link>
      <description>&lt;P&gt;Funny... I was quite close to that one but I failed to see the&amp;nbsp;potential. I once wired a blank variant to the conversion VI and found that some of the no-go-errors disappeared.&lt;/P&gt;&lt;P&gt;But I&amp;nbsp;didn't get the point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks, all!&lt;/P&gt;</description>
      <pubDate>Sat, 28 May 2016 16:56:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Iterating-through-unknown-cluster-attributes/m-p/3301824#M966014</guid>
      <dc:creator>Sheepyhollow</dc:creator>
      <dc:date>2016-05-28T16:56:31Z</dc:date>
    </item>
  </channel>
</rss>

