Solved! Go to Solution.
I'm convinced that the only way to access that is through the UI Message called out in the help.
However, you can create your own OutputMessages object and use it:
Locals.OutputMessages = RunState.Engine.NewOutputMessages()
Locals.OutputMessages.AsOutputMessages.Add(RunState.Engine.NewOutputMessage("Hi There", "Hello", OutputMessageSeverity_Information, Nothing))
Then to read it us:
The only downside to all of this is that it doesn't post, so no UI Message this way. However, you still get all the functionality of the OutputMessages.
Hope this helps,
Thanks jiggawax! I see what you're proposing, I think can make use of that technique less the posting part for what I'm trying to accomplish.
Note that when TestStand obsoletes API, that API is still functional. The new API supports the notion of having multiple clients, such as the Sequence Editor control, and other customer created components, which might be your use case.
How do you make your own created collection of output messages post a UI Message? The only post API functions I see are for the ones in the collection owned by TestStand.
You can call engine.NewOutputMessages to create an empty collection for your UI component to manage. There is code in the help for the OutputMessages collection that illustrates how you might use it. If you want to maintain the collection outside of the scope of the callback then you would create the collection on init and store as a member of your control or form. Does that answer your question?
// C# example
if (uiMsg.Event == UIMessageCodes.UIMsg_OutputMessages)
OutputMessages outputMessages = uiMsg.ActiveXData as OutputMessages;
OutputMessages appOutputMessages = engine.NewOutputMessages();
for(i = 0; i < appOutputMessages.Count; i++)