08-05-2024 09:50 AM
Hello,
I'm a C# programmer, and I've recently created a DLL that inserts all sequence steps, including subsequences, into TestStand in one action. The problem I'm encountering is that after activating my DLL, the limit variables from the previous run are saved when I start TestStand again. I want these variables to revert to their default values after the TestStand run finishes.
I'm using this call for each sequence in the program :
PropertyObject prop = seqContex.AsPropertyObject();
var seqObj= (Sequence)prop.GetPropertyObject("RunState.SequenceFile.Data.Seq[" + i + "]" , 0 ); //to go straight to the sequence in the i place
seqObj.GetStepByName(test.Name, StepGroups.StepGroup_Main).AsPropertyObject().
SetValNumber("Limits.High", 0, (double)Convert.ToDouble(test.Limits[0].High)); //to insert the High limit
Regards,
Lior
08-05-2024 11:58 PM
I am wondering if I understood correctly: you have one step in your sequence file that calls a DLL which then populates this exact sequence file with all neccessary steps?
Do you save the file at any point?
How do you handle possible re-creation of steps on consecutive runs?
09-01-2024 06:43 AM
yes, my dll insert all of the limit data from the Json I created to the teststend to all of the sequences in my test program. I don't save the teststend file. only run the action.