NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET C# inserting all of the steps limit in one run

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

0 Kudos
Message 1 of 3
(264 Views)

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?

 

 

0 Kudos
Message 2 of 3
(242 Views)

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. 

0 Kudos
Message 3 of 3
(207 Views)