04-19-2012 05:35 AM
Hello all,
I'm attempting to use the dataPropObj parameter of the SetEx method to send information from LabVIEW to TestStand while setting of the notifier. The notifier works perfectly by itself when I wire the default constant empty variant to the dataPropObj input of the INotification invoke method node, however anything else that gets wired in causes some kind of problem. I've tried wiring a string (which according to the SetEx description, should work), as well as a string converted into a variant. Whether or not the string is empty, neither works. TestStand hangs at the step which is waiting on this notification. Again, the notification works fine when I only wire an empty variant constant to the dataPropObj input.
All of this is to work as part of a bigger VI, but I've extracted just this functionality out to its own sequence and vi, so there shouldn't be any other interfering factors that I can think of. If it makes a difference, the VI is called asynchonourly during the Cleanup group of the MainSequence. I do this by calling a subsequence as a new thread.
Any help is appreciated.
Thanks
Solved! Go to Solution.
04-19-2012 12:18 PM
You need to use Engine.NewPropertyObject() to create the variable you pass for the dataPropObj parameter. For example, if you want to pass a string you need to do the equivalent of:
PropertyObject myPropObj = Engine.NewPropertyObject(PropValType_String, false, "", 0);
myPropObj.SetValString("", 0, MyStringValue);
Hope this helps,
-Doug
04-20-2012 01:52 AM
This worked exactly as you described. Thanks!