I'm using this method (https://zone.ni.com/reference/en-XX/help/370052R-01/tsapiref/reftopics/execution_addpoststepcustomui...) to post a message (code 10020 or something like that) to a labview application when certain conditions are met. It works perfectly in one thread, but when I launch a sequence in another thread (for testing, a for loop that runs 10 times and waits 1 second per iteration) I don't seem to get any messages in my callback (specifically, application manager-after UImsg callback). Any thoughts on how I can get these messages to show up?
If any of the details help:
I'm using applicationmanager control to get an engine, running a sequence file using the new execution method, specifically using the sequential execution model. The post step UI message is to give me hooks to pull data out at certain points, for this test the filter is set to (if sequencetype=normal and sequencefiletype=normal) in order to avoid getting any process model steps. I've confirmed within the teststand editor that the parallel sequence has these qualities.
Solved! Go to Solution.
I've actually never seen this method before - wish i knew about it before implementing something similar in an engine callback...
Anyway, it looks like the CustomUIMessageOptions parameter has a CustomUIMsgOptions_AppliesToAllThreads option, which isn't set by default.
CustomUIMsgOptions_AppliesToAllThreads–(Value: 2) Use this flag to send custom user interface message to all threads this execution creates. Otherwise, only the foreground thread of the execution sends this message.
Hope this helps!