07-14-2009 06:40 PM
I am perplexed as to why I cannot obtain the variable value when I supply the variable context as a parameter (VarContext below), but it works when I use the sequence context. I was hoping to avoid the complete lookup string path, but it seems that it must always be from the root sequence context.
It may not seem like a big deal whether it's "Locals.Var" or just "Var", but this is just an example - some of my lookup strings are highly nested and thus very long.
Any ideas?
Thanks,
Ronnie
Solved! Go to Solution.
07-14-2009 11:07 PM - edited 07-14-2009 11:09 PM
Right Click on your VarContext control on the front panel.
Select ActiveX Class>>Browse..
Under Type Library select NI TestStand API x.x.x Version x.x
Under Objects choose PropertyObject
You cannot assume that the Locals is the sequence context. If you open up the TS - Get Property Value.vi you will see that it assumes you are passing the sequence context.
Now instead of using the TS - Get Property Value.vi replace that with an invoke node. Choose GetValNumber as the method to call.
Wire your string constant with Var in it to the LookupString parameter and a numeric constant with 0 in it to the options parameter.
Wire the GetValNumber to your value indicator.
You should be good to go now.
07-15-2009 10:55 AM
Jigg,
Thanks for the help and especially the detailed instructions. It worked perfectly.
Really appreciate it.
Thanks again,
Ronnie