12-11-2012 07:31 AM
Hello,
i have a custom C#-OPUI to load and execute testplans.
I do this using these funtions:
1. ApplicationManager.OpenSequencFile(filename)
2. ???
3.Command TestStart = axSequenceFileViewMgr.GetCommand(.......)
TestStart.Execute(true)
The question is now: How do i know that the OpenSequenceFile has finished doing everything?
I need to know that is finished before i run the execute-command.
Is there a specail final-event that i can check?
Thanks for help
Solved! Go to Solution.
12-11-2012 05:23 PM
Have you tried:
ApplicationManager.Executing
From the TS Help:
Executing Property (Read Only)
Syntax
ApplicationMgr.Executing
Data Type
Boolean
Purpose
Returns True when an execution is running.
Seems that would tell you if there are any active executions.
12-12-2012 03:39 AM
Hi jigg,
Thanks for the info.
In my sequence file, besides the main sequence, I also enabled "SequenceFileLoad" callback. In "SequenceFileLoad" sequence, I added some instruments initialization tests. The goal is to initialize the instruments only once when the sequence file is loaded. Therefore I need to know when the "SequenceFileLoad" is finished or when the sequence file has finished loading.
My first idea is to use the event "axApplicationMgr_SequenceFileOpened", but I found that I will catch this event before the "SequenceFileLoad" execution finished.
And then, I also found that together with the execution of sequence "SequenceFileLoad", there are 2 events in my C# code: "axApplicationMgr_StartExecution" and "axApplicationMgr_EndExecution" triggered. So I was thinking may be I can use "axApplicationMgr_EndExecution" to determine if the sequence file has finished loading. But the problem is every sequence execution will trigger these 2 events. The main sequence will also trigger these 2 events. So I needs to know the name/ID of the current executing sequence.
So Is there a way to read current executing sequence name?
Thanks and regards,
0049
12-12-2012 08:52 AM
Well, if you read my previous post you'll see that you can just tell if an execution is occuring.
However, if you need the name of the sequence file then you can use:
ApplicationManager.Executions (read more about it in the TS help). Once you have the list you can check the Count (if it's 0 then you know the SeqFileLoad is completed). Or you can get Items (Executions). From there you can iterate the items and do pretty much whatever you'd like. For instance there is a method called Execution.GetSequenceFile. This will let you know the name of the Sequence File.
For more information about the Execution object refer to the TS help. This should definitely get you pointed in the right direction.
Regards,
12-14-2012 07:43 AM
Thanks. I will try that out.