NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

context values disappear after save

Hello,
I am using TestStand 3.5 to create a step type and Visual Studio 2005 to create a C# dll which the step type accesses.  The step type has one edit substep which calls edit() in the C# dll and and the default module calls execute().  During the edit step I set 4 context values, eg. Step.Action, Step.Instrument, Step.Address, etc.  When I have completed the edit step, I see the context values in the tree browse and with the "browse sequence context" menu just fine.  But when I save the sequence and re-open it, they are gone.  I can re-add them but the process just starts over again.
 
Here is the code that is adding them:
 

public int edit(ref SequenceContext sc)

{

PropertyObject po = sc.Step.AsPropertyObject();

po.SetValString("Action", 0x1, uxActionPullDown.SelectedItem.ToString());

po.SetValString("Instrument", 0x1, uxModel.SelectedItem.ToString());

po.SetValNumber("GPIB_Address", 0x1, Convert.ToDouble(uxGPIB.Value));

}

 

Any help would be greatly appreciated

0 Kudos
Message 1 of 3
(2,908 Views)

Hi,

Are these properties defined statically as part of the Step properties or are you trying to insert the dynamically?

Regards

Ray farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 3
(2,899 Views)

They are not statically defined, I had defined them programmatically.  I would rather have them static but was having problems with that also.  I did figure out how to statically add them, I was in the wrong area trying to do it so my problem will be moot.  It is a wonder what a weekend away not thinking about the problem will do.

 

Thanks for the help, your question sparked the solution

0 Kudos
Message 3 of 3
(2,891 Views)