Jump to content

Lookup or add Variant attribute using IPE example

Recommended Posts

I'm blind. Right.

I guess I'm trying to figure out the advantage of this programing method vs just using the "set variant attribute" primitive. I just want to add or update an attribute value. Not necessarily read it or access it for any reason. The primitive adds the attribute if it's missing anyway.

Link to post
Share on other sites

There's no advantage in the lookup case. That was just to show syntax. The advantage in the increment case is the same as with the other IPE border nodes. It provides a cleaner syntax and, if the child variant is large, it might improve performance by avoiding a copy.

Link to post
Share on other sites

I saw some mild performance benefit from using the IPE for variant look ups instead of the primitives, but I remember it being a bit of a pain to test and use at times.  I think something about creating an attribute if it didn't exist.  Maybe it was just the way I was trying to use them.

Edit: found my speed tests on the dark side for writing and reading attributes, it seems writing is going to be faster with the primitive, but a read that does nothing but return the value, is slower with an IPE than the primitive.  Of course I'm sure NI intended on this feature being used where you perform a read, manipulate the data, and write it back in the same structure, which will probably result in even better performance.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.