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.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
SpaceX Trip

Blank String Written to Variant Attributes List Shouldn't Wipe Entire List

Status: Declined
Withdrawn by commenter.

If you try to "set variant attribute" and inadvertently wire in a blank string, this wipes out all other attributes from a list of attributes inside a variant.  An error should be returned, but destroying the rest of the list of attributes should not occur.

5 Comments
SpaceX Trip
Member

This is referring to wiring in a blank string for the "name" terminal.

tst
Knight of NI Knight of NI
Knight of NI

I agree with you that this doesn't seem to make sense from an API perspective and that this could be implemented with a separate primitive, but I'm not sure how easy it will be to change it, because there might be some code out there which relies on this.


___________________
Try to take over the world!
Darin.K
Trusted Enthusiast

I do not have LV here to test, but I have posted enough examples to the Forums where I specifically rely on a blank name to throw an error to stop a While Loop and this does not empty the attribute list.  The behavior you describe is similar to wiring a blank name to Delete Attribute.

 

If this is new/different behavior in LV11 then this is a bug of the highest order.  Please confirrm version and post a snippet demonstrating this behavior.

SpaceX Trip
Member

I must be mis-remembering.  You're absolutely right, the error that gets thrown out when you wire in a blank string must have screwed me in some larger architecture designs in the past.

 

Thanks for requesting the snippet of code, it allowed me to go back and verify this behavior.

 

We can delete this idea post.

srdfrn
NI Employee (retired)
Status changed to: Declined
Withdrawn by commenter.
Stephanie R.
National Instruments