‎07-20-2018 11:24 PM
Hi Bob, thanks for your time. Working on this made me realize how cool Variants are. I'll be using these on the regular - though probably in a more traditional fashion. Thanks very much for your time; I really appreciate it.
‎07-21-2018 02:40 PM
@AndyEngines wrote:
Hi Bob, thanks for your time. Working on this made me realize how cool Variants are. I'll be using these on the regular - though probably in a more traditional fashion. Thanks very much for your time; I really appreciate it.
You are welcome. To really show your appreciation, and to help other Forum users who may also stumble upon Variants used this way, I recommend you mark Altenbach's last post, which shows what's really going on and how to "make it work for you", as the "Solution". This is something that the Original Poster (you) are supposed to do when your Problem has been Solved ...
Bob Schor
‎07-21-2018 03:47 PM - edited ‎07-21-2018 04:01 PM
@altenbach wrote:
You can get all attributes if you don't wire a name and can create a list as follows (same for the other variant). Find the attribute name you want to change, the rewrite the attribute to get the changed variant.
OK, quickly looking further into this, there is something wrong with the "DTC Ignore" variant, because it does not return any attributes. Not sure what this is all about (See below * for some guess). Just generate a new one as shown in the upper part.
*It looks like the second variant does not contain any attributes. The variant data is a string formatted to look like attributes. This seems wrong and I would just write a new one as suggested.
‎07-21-2018 04:05 PM
The only reason your original code seemingly "works" with the faulty variant is the fact that all of them seem to be false and this is also the default value returned if nothing is found. You are not actually reading any attributes of "DTC Ignore", you are just handed the default. The code is seriously broken!
‎07-23-2018 07:42 AM
Hi Altenbach,
Thank you very much for your help. This discussion with other LabVIEW-ists really helped me work through the issue.
By the way, the messed up part of the code was, I realize now, an artifact of me trying to figure out what's going on - so that's been fixed as well.
Thanks for your time,
-Andy