LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
kegghead

In Place Element Structure Support for Variant Attributes

Status: Completed

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:

 

IPEAA.png

 

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.

10 Comments
AristosQueue (NI)
NI Employee (retired)

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.

altenbach
Knight of NI

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. 😄

kegghead
Member

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.

drjdpowell
Trusted Enthusiast

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.

 

-- James

JackDunaway
Trusted Enthusiast

Bump for a great idea. I often miss this syntax (performance increase is just a welcome incidental).

drjdpowell
Trusted Enthusiast

Found it yet again, as I'm facing an annoying refactor for performance to get around the unnecessary data copies.  Can somebody implement this PLEASE.

jlokanis
Active Participant

This has bitten me more than once now.  We really need a way to solve issues like this.  Please make this a priority!

-John
------------------------
Certified LabVIEW Architect
mperss
Member

This would be really appreciated!

Darren
Proven Zealot
Status changed to: In Beta
 
Darren
Proven Zealot
Status changed to: Completed

Available in LabVIEW 2016 and later. Right-click the border of an In Place Element Structure and select "Add Variant Attribute Get / Replace".