From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
Available in LabVIEW 2016 and later. Right-click the border of an In Place Element Structure and select "Add Variant Attribute Get / Replace".
Since LabVIEW lacks a native dictionary/hashtable/associate array implementation, I find myself using Variant attributes for this. A lot. And they work beautifully. But I'd really love to be able to use the IPE structure to be able to operate on my name/values:
There are definite cases when the value can be operated on in place, and it cleans up the code considerably by not having to keep the variant and key wires along for the ride when you're done operating on the value.
The variant attribs got another performance kick in LV 2010. Putting them into the IPE is an idea we have talked about. It's definitely on the list of things we'll consider the next time the IPE gets revisited.
Good idea! Of course if we had native associative arrays, we probably would no longer need the variant version in the IPE, but something more direct. 😄
Figured this might stand a wee bit better chance of getting implemented since it's really just making two existing things play nice together. I'd prefer a full implementation way more, but I'd be happy with just IPE support for now since I know 2011 will be one of the "improvement" releases, and probably not have anything fundamentally new.
Found this again (had forgotten I'd already kudoed it) when I was about to post the same idea. One extra thought I had was that one could get similar ability to operate of variant attributes "in place" by modifying the "Delete Variant Attribute" function to return the deleted value. Presumably this could be done without a data copy, so one could "delete" the attribute, modify it, and return it.
Available in LabVIEW 2016 and later. Right-click the border of an In Place Element Structure and select "Add Variant Attribute Get / Replace".