LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace Array element by variant

Solved!
Go to solution

Hello,

I'm building an application where I need to be able to replace an array element by variant like in this example. To my surprise this doesn't work, when you bring back the variant to the property node it returns error 91.

The reason I have to work like this is because it's not possible to have a reference to a specific element within an array, with clusters it's possible to have the reference of an element but not if that cluster is part of an array.

ReplaceVariantElement.png

Is it possible to do something like that?

 

Cheers,

Jimmy

0 Kudos
Message 1 of 3
(1,783 Views)
Solution
Accepted by topic author JICR

It fails when you try to convert back to a variant from a variant array or from a variant array to a cluster. OpenG can help with that. I don't know if you have tat toolkit, but here's a VI for you. OpenG is found on VIPM.

Certified LabVIEW Architect
0 Kudos
Message 2 of 3
(1,773 Views)

Why do you need to need to do this by a reference?  If you really need a reference, then a Data Value Reference to the array would be what you really want.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(1,762 Views)