04-22-2009 08:35 AM
I am trying to generate a custom message in order to update the OI with test status, value measured, etc etc. I have created a function call in the ProcessModelPostResultListEntry and can easily pass the the following:
ThisContext as a NationalInstruments.TestStand.Interop.API.SequenceContext
Parameters.Step as a NationalInstruments.TestStand.Interop.API.Step
Runstate.Thread as a NationalInstruments.TestStand.Interop.API.Thread
But I cannot find the object or object reference to pass Parameters.Result. I have tried just passing it as an object reference and unboxing it in C# with no luck and there are no "Result" objects in the API. I also tried to pass it into a PropertyObject variable but TestStand complained it was not a PropertyObject type
I also tried to do this: PropertyObject po = ThisContext.Parameters which should have worked, but po.Exists("Parameters.Result") is false
Finally, when I am in the debugger I can't see the Paramaters, it shows an exception. I have verified I am looking at the sequenceContext of ProcessModelPostResultListEntry and not MainSequence which I would expect to be empty. Variable list in TestStand shows Parameters.Result populated correctly with all the information I want, especially in the Parameters.Result.TS container
I am using TS 4.1.1, Visual Studio 2008, .NET 3.5
Solved! Go to Solution.
04-22-2009 09:00 AM
Hi whizzs
Try:
// Get PropertyObject from Context
PropertyObject ProObj = MyContext.AsPropertyObject();
PropertyObject ProObjResult = ProObj.GetPropertyObject("Parameters.Result",0);
Also visit this Threads
http://forums.ni.com/ni/board/message?board.id=330&message.id=23518&query.id=281174#M23518
http://forums.ni.com/ni/board/message?board.id=330&message.id=17663&query.id=281482#M17663
Greetings
Juergen
04-22-2009 02:43 PM