<?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 Re: Collection of objects, reference vs. data flow in LabVIEW</title>
    <link>https://forums.ni.com/t5/LabVIEW/Collection-of-objects-reference-vs-data-flow/m-p/939657#M421663</link>
    <description>&lt;P&gt;Yes, I'm using Labview 8.6.1.&amp;nbsp; I've seen both of the references that you indicated, but I'll have to re-read them in more detail.&amp;nbsp; Also, I see that&amp;nbsp; LAVA is back online, so that will be a good resource.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the "inplace structure", thanks, I didn't know about that and it looks like a good suggestion. It should fit as a new method within my collection class.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;http://zone.ni.com/devzone/cda/tut/p/id/6211&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ni.com/docs/en-US/bundle/labview/page/in-place-element-structures-increasing-memory-efficiency.html" target="_blank" rel="noopener"&gt;https://www.ni.com/docs/en-US/bundle/labview/page/in-place-element-structures-increasing-memory-efficiency.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;A href="http://thinkinging.com/2008/01/29/in-place-element-strucure-saves-time-and-prevents-bugs/" target="_blank" rel="noopener"&gt;http://thinkinging.com/2008/01/29/in-place-element-strucure-saves-time-and-prevents-bugs/&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Oct 2025 16:39:11 GMT</pubDate>
    <dc:creator>ArchivedPointOnePa</dc:creator>
    <dc:date>2025-10-28T16:39:11Z</dc:date>
    <item>
      <title>Collection of objects, reference vs. data flow</title>
      <link>https://forums.ni.com/t5/LabVIEW/Collection-of-objects-reference-vs-data-flow/m-p/939618#M421644</link>
      <description>&lt;P&gt;I have a Labview class that is a collection of objects from another class (c1), held within an array.&amp;nbsp; This is similar to a Visual Basic Collection with a method of indexing and adding to the collection/array.&amp;nbsp;&amp;nbsp; If I understand Labview classes correctly, Labview objects are passed by value and not by reference.&amp;nbsp; So, in my example with a collection of objects, if I need to update one of the attributes within one of the objects (o1), I'll need to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1) index into the array; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2) extract the object (which make a copy); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3) update the attribute within the object; then &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4) insert the object back into the array, (over-writing the original object).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If the class associated with object (o1) has 40-50 attributes, it seems inefficient to make a copy of the entire object just to update one attribute.&amp;nbsp; In C/C++, I would just use a pointer to the instance and update it directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My questions is: &lt;/P&gt;&lt;P&gt;&amp;nbsp; 1)&amp;nbsp; what is an efficient way to update the attribute of an object held within an Labview Array?&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; (or is there a better way to do this). &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; 2)&amp;nbsp; where can I find references that compare/contrast labview programs to C/C++,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; so that I might better understand how to code efficiently in Labview.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jul 2009 19:25:11 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Collection-of-objects-reference-vs-data-flow/m-p/939618#M421644</guid>
      <dc:creator>ArchivedPointOnePa</dc:creator>
      <dc:date>2009-07-06T19:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of objects, reference vs. data flow</title>
      <link>https://forums.ni.com/t5/LabVIEW/Collection-of-objects-reference-vs-data-flow/m-p/939634#M421649</link>
      <description>&lt;P&gt;If you have 8.5 or later, your best bet for minimizing copies&amp;nbsp;is the inplace structure, and it has the added advantage of producing cleaner code for something like this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As for a comparison, you should start by reading &lt;A href="https://www.ni.com/en/support/documentation/supplemental/06/labview-object-oriented-programming-faq.html" target="_blank" rel="noopener"&gt;this&lt;/A&gt; and &lt;A href="https://www.ni.com/en/support/documentation/supplemental/06/labview-object-oriented-programming--the-decisions-behind-the-de.html" target="_blank" rel="noopener"&gt;this&lt;/A&gt;. Also, the LAVA forums have a lot of good discussions about LVOOP which you will want to look through.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Nov 2025 18:53:42 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Collection-of-objects-reference-vs-data-flow/m-p/939634#M421649</guid>
      <dc:creator>tst</dc:creator>
      <dc:date>2025-11-13T18:53:42Z</dc:date>
    </item>
    <item>
      <title>Re: Collection of objects, reference vs. data flow</title>
      <link>https://forums.ni.com/t5/LabVIEW/Collection-of-objects-reference-vs-data-flow/m-p/939657#M421663</link>
      <description>&lt;P&gt;Yes, I'm using Labview 8.6.1.&amp;nbsp; I've seen both of the references that you indicated, but I'll have to re-read them in more detail.&amp;nbsp; Also, I see that&amp;nbsp; LAVA is back online, so that will be a good resource.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the "inplace structure", thanks, I didn't know about that and it looks like a good suggestion. It should fit as a new method within my collection class.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;http://zone.ni.com/devzone/cda/tut/p/id/6211&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.ni.com/docs/en-US/bundle/labview/page/in-place-element-structures-increasing-memory-efficiency.html" target="_blank" rel="noopener"&gt;https://www.ni.com/docs/en-US/bundle/labview/page/in-place-element-structures-increasing-memory-efficiency.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="noindex"&gt;&lt;A href="http://thinkinging.com/2008/01/29/in-place-element-strucure-saves-time-and-prevents-bugs/" target="_blank" rel="noopener"&gt;http://thinkinging.com/2008/01/29/in-place-element-strucure-saves-time-and-prevents-bugs/&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Oct 2025 16:39:11 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Collection-of-objects-reference-vs-data-flow/m-p/939657#M421663</guid>
      <dc:creator>ArchivedPointOnePa</dc:creator>
      <dc:date>2025-10-28T16:39:11Z</dc:date>
    </item>
  </channel>
</rss>

