04-08-2012 07:27 AM
Hi. I need to build a custom Operator's Interface (with CVI 9) for running sequence files. My problem is how to run a selected steps using single pass. I'm using the TestStand API for most other things. But I just can't seen to find the way to "select" several steps and then run them.
Thanks,
Yariv
04-09-2012 02:58 PM - edited 04-09-2012 02:58 PM
Hello Yariv,
Which version of TestStand are you using?
You should be able to ctrl-click a number of steps, then right click and select Run Selected Steps.
04-10-2012 08:16 AM
Hi,
I'm Using TS 4.2. I need to imitate the "Run selected steps" in a UI that I'm developing with CVI 9.5 and not via TestStand's applications.
04-10-2012 09:07 AM
yariv,
If you have connected your SequenceView control correctly then you should be able to do as Jacob suggested.
However, if you are looking to do this dynamically there is an API call: SequenceFileViewMgr.RunSelectedSteps(). You can read about that function in the TestStand help.
If you need to know how to connect the control correctly then look at the source code for the UI that ships with TestStand. There is a CVI one in there.
Hope this helps,
04-22-2012 03:43 AM
Hi,
I'm using the TS API (tsutil.fp). I'm trying to run selected steps. There is no GUI where the user can actualy mark the steps that needs to run using Single Pass. These steps are loaded from a configuration file.
The help on all the functions are no help at all. The function "TS_EngineNewExecution" has a parameter called InteractiveArgs of type VARIANT. There is no help to which field in the variant I'm supposed to use.
In general, I perform the following actions:
1. Open a sequence file (TS_EngineGetSeqFile followed by AddModelEntryPoints)
2. Load the steps to run from a configuration file (Each step is a sequence call located in the MainSequence). The configuration file contains the Steps ID.
3. Here is the problem: I need to "Tell" the engine what steps to run from the main sequence in the Single Pass execution when calling the TS_EngineNewExecution function.
Thanks.
04-22-2012 08:55 AM
Not sure which help you are looking at yariv. I find the TestStand help to be very helpful whenever I use it.
I understand that you are using the tsutil.fp but I'm almost positive the functions are the same as what you find in the TestStand help.
Here is the info from the help:
When you call the Engine.NewExecution or Thread.DoInteractiveExecution methods to create an interactive execution, use an object of this class to pass information about the current state of the user interface. These methods use the object to determine which steps are currently selected in the user interface.
Create objects for this class using the Engine.NewInteractiveArgs method.
LoopCount |
NumSteps (Read Only) |
Sequence |
StepGroup |
StopExpression |
AddStepIndex |
AsPropertyObject |
ClearStepList |
ContainsStep |
GetStepIndex |
My guess is that before you call the NewExecution function you would need to call TS_NewInteractiveArgs and then use the AddStepIndex function to add steps to the InteractiveArgs object. It also looks like you would use the Thread object to call DoInteractiveExecution once you have everything set up correctly.
Not sure exactly what the order or calls would be but I'm guessing that should get you on the right track.
04-24-2012 01:50 AM
Hi,
The TS_EngineNewExecution function takes a VARIANT type as the last parameters. How do I pass the InteractiveArgs into this function? In the helt it says:
InteractiveArgsParam As Variant
[In] [Optional] Pass an InteractiveArgs object that indicates which steps are currently selected in the user interface and contains looping information necessary for an interactive execution. Pass this parameter only for interactive executions.
I understand that there is a mix-up here. The InteractiveArgsParam is supposed to be an InteractiveArgs object (CAObjHandle) and not a VARIANT. Can anyone shed some light on this issue?
04-25-2012 03:45 PM
Hello yariv,
Sometimes a function will accept the CAObjHandle and convert it internally. I tried passing an CAObjHandle to the EngineNewExecution function and got the same error saying that the function was expecting a VARIANT.
The VARIANT data type is a structure that can hold any ActiveX data type. What you need to do is use one of the CVI ActiveX functions in the Assigning Value to Varients class.
This will convert the CAObj into a VARIENT that you can pass to EngineNewExecution.
The function name is CA_VariantSetObjHandle (VARIANT *Variant, CAObjHandle Value, unsigned int Desired_Variant_Type);
04-29-2012 06:29 AM
It works!!! That function was just what I needed. Thank you very much.