03-06-2014 01:44 AM
HI doug,
I'm using simple GUI example of NI
My file sequence contains two sequences,main sequence and sub sequence.
Now, When I clicked on single test button the main sequence executes,What I want is to clicked on a different button and the sub sequence will be executed.
Tnx
03-06-2014 03:38 AM
Hi All,
when I clicked a button that statement run but nothing happened.
engine.NewExecution(axSequenceViewMgr.SequenceFile, "PowerOn", null, false, ExecutionTypeMask.ExecTypeMask_Normal, Type.Missing, Type.Missing);
What to do to execute "PowerOn" sequence???
03-06-2014 09:07 AM - edited 03-06-2014 09:09 AM
@NewSCRUser wrote:
Hi All,
when I clicked a button that statement run but nothing happened.
engine.NewExecution(axSequenceViewMgr.SequenceFile, "PowerOn", null, false, ExecutionTypeMask.ExecTypeMask_Normal, Type.Missing, Type.Missing);
What to do to execute "PowerOn" sequence???
That should work (Or throw an exception if the parameters are invalid). Maybe it's running, but not being displayed. Have you put something like a messagepopup step in that sequence to see if it's running or not? Have you made any other changes to the UI? Have you tried stepping through the code in a debugger to make sure you are passing the parameters you expect and that no exceptions are being thrown?
-Doug
03-09-2014 12:54 AM
Hi Doug,
To Answer to your questions,
None of the events occured (axApplicationMgr_StartExecution,axApplicationMgr_EndExecution)
No exceptions happened
Why I don't see it on the execution panel?
03-10-2014 10:30 AM - edited 03-10-2014 10:40 AM
Perhaps you made some other changes which are breaking things.
I added a button with the following callback to the simple C++ User interface example and it works fine for me:
void CTestExecDlg::OnBnClickedButton1() { mApplicationMgr->GetEngine()->NewExecution(mSequenceFileViewMgr->GetSequenceFile(), "myseq", NULL, VARIANT_FALSE, TS::ExecTypeMask_Normal); }
Whenever I have a sequence file loaded, with a sequence named "myseq" and click that button it correctly runs it and shows the trace of the execution in the UI.
Here's a screen shot of what happens when I push "Button1":
I recommend you start from scratch with the original source code for the example UI you are using, and then slowly add back in your changes and see which ones are causing the problems you are seeing.
Hope this helps,
-Doug