NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to detect any changes of a StepType-field by the sequence ?

Solved!
Go to solution

Hi all,

 

suppose I've got this: a simple StepType 'TEST' with one added custom field 'Source' of the type String.

When using this StepType in a Sequence and editing the 'Source' value (from the Variables panel),

the Sequence name is immediately marked with an '*'. Which is wat we want 🙂

 

But, if I change the 'Source' value from code (C#), I see that my 'Source' value is changed (in the Variables panel), but not that the Sequence has detected this.

 

Maybe it's StepType-flag that I have to set or from code, executing a trigger or so ?

 

 

Thanks in advance ?

Franky

0 Kudos
Message 1 of 5
(3,255 Views)

A quick answer to myself :  use the property flag PropFlags_Shared.

0 Kudos
Message 2 of 5
(3,250 Views)

Way too fast !

 

Using the property flag PropFlags_Shared is not a solution, because that flag sets a field as a shared object, which is not what I want.

0 Kudos
Message 3 of 5
(3,238 Views)
Solution
Accepted by topic author FOstyn

I'm talking to myself, but FYI:

 

because I'm updating my sequence from code (C#), I've the current Step as an object and

therefore I knows if any fields are changed.

Using this snippet will mark my sequencefile as 'changed' : 

 

step.Sequence.SequenceFile.AsPropertyObjectFile().IncChangeCount();

 

Message 4 of 5
(3,233 Views)

Correct. Whenever you programmatically edit a sequence file, you should increment the file's change count in order for the sequence editor to detect that the file has been modified.

 

-Doug

Message 5 of 5
(3,224 Views)