Example 1 - Modifying an Element of a Cluster
Traditionally, if you wanted to perform an in-place operation on an element of a cluster, you would unbundle it, operate on it, and bundle it back into the cluster, like this:
And, here is how you would do it with an In Place Element Structure :
Example 2 - Modifying an Element of an Array
Traditionally, this is how you would convert one element of a string array to lowercase:
" zid="49" />
And, here's how we would do it using an In Place Element Structure :
Conclusion
While the difference between the traditional way of performing an in place operation doesn't look remarkably different from how you would do it with an In Place Element Structure , there are some real advantages to using this new structure:
- Saves time : fewer nodes, fewer wires, fewer mouse-clicks
- Code is cleaner : fewer wires
- More maintainable : The unbundle and bundle nodes of the In Place Element Structure stay synchronized (you change one and the other changes to match it).
Nicelydone and perhaps this will induce NI to migrate the In Place Element Structure ot the STRUCTURES palette — where it belongs!
In the future, there will be more structures that are not in the “Structures” palette. This palette has turned out to be a bad idea as structures are added that relate to specific aspects of LabVIEW. The general “flow of control” structures will remain where they are, but others may appear in palettes specific to their purposes. The Inplace Element Structure is merely the first of these.
As always, the phrase “in the future” has no bounding when I use it to describe LabVIEW, and you may not see anything along these lines for many years.
Why can’t it be in both locations? In the Memory Control palette AND the structures palette?
In any case NI yet again seems to be out of touch with how the typical user “uses” the LabVIEW environment.
– Rant on –
I agree with Mr. Aivaliotis, NI doesn’t recruit from Industry enough for the dev teams to have any real knowledge of how the average user interacts with the software.
– Rant off –
I put the memory control sub palette on the structures palette, not a great solution, but at least the structure is accessible this way. It would be great if we had the ability to fully customize the palettes versus just adding other palettes and VIs…. as in, copy the link from the memory control palette to the structures palette at our choosing.
Jim,
I can’t see the code snippet images you’ve put in your blog. I’ve tried IE7 and Firefox 2, but it could still be something on my end. I’m assuming everyone else can see them right?
Chris: I did something a little different with the images, this time. I hosted them on Flickr. Is flickr.com blacklisted by your IT dept?
Jim,
I haven’t tried it myself yet, but I think this proves that flickr is blocked by my IT department. Thanks for your blog.
Chris: I’ve made the images local. You should now be able to see them.
Someone just posted this bug to NI’s forums.
Sorry, I messed up the link.
Patrick: That looks like a nasty bug. Thanks for link.