From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
CyGa

Update step fields after using an Edit Step

Status: Declined

I'm declining this idea due to lack of community support.

When you use an edit step to modifiy the values contained in your step inputs/outputs, the fields are not updated with the new values. You have to close the step tree branch and reopen it to see the updated values. A good idea would be to refresh the step section after the execution of an edit step !

Update step val after Edit Step

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
11 Comments
dug9000
NI Employee (retired)

Your substep must not be incrementing the file's change count. If you have the source code, you should add something like:

 

sequenceFile.AsPropertyObjectFile.IncChangeCount();

 

to the end of the code after the user has pressed ok on the dialog. If you do this then the variables view will get refreshed when your edit substep completes. Also the file will now be correctly marked as modified and undo will now work.

 

Hope this helps,

-Doug

CyGa
Active Participant

Indeed this helps !

Anyway, I think this should be done automatically without having to 'manually' increment the file's change count. If an edit step runs, I think TS could detect it and increment by itself the file's counter.

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
dug9000
NI Employee (retired)

The issue is that you probably don't want the file to be marked as modified and an undo item created if the user pressed the cancel button on the dialog. TestStand could potentially diff the step before and after the edit substep to see if it was modified though. But that then assumes the editsubstep only modifies the step that is active. It might modify other steps or settings on the sequence or sequence file. Perhaps TestStand could require that editsubstep code that modifies anything other than the active step must still explicitly call IncChangeCount(). That might be sufficient.

CyGa
Active Participant

An easy way to do this is to generate a "refreshUI" event each time a variable (local, global, station, step...) is changed when editing sequences (not while executing them of course)... That way, no change would be made to file's counter or other 'hidden' properties. A slow loop (250ms)checking the difference between well chosen variables should be enough to fire such event.

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
tomhigh
Member

 I've encountered a simular isses. I have  many Custom Steps that change Step Variables and none of those changes are recognised by the sequence editor as a change to the sequence file that requires saving. These changes immediately show up in the step's "Property Browser", so TestStand knows that a change has occurred. This is documented in trouble call #7355028.

 I was given the work-around of adding the "sequenceFile.AsPropertyObjectFile.IncChangeCount()" code to my module code and it works OK, but I really would consider this a bug.

 

Even more interesting is that the step value changed with no change registered in the file, but if I hit CTRL-Z to undo the change, the variable will be restored to it's previous unchanged condition and the sequence file then thinks it has changed and needs to be saved even though it's now in the un-changed condition.

 

 I will admit that properly using the "sequenceFile.AsPropertyObjectFile.IncChangeCount()" call does properly sync the changes with the sequence file status, so the work-around does work correctly.

 

Thanks,

   Tom

Certified LabVIEW Developer
dug9000
NI Employee (retired)

I suggest that everyone who has hit this issue should kudo the idea so we have some idea how common this problem is.

Josh_W
Active Participant

I ran into this issue.

 

But as Doug describes, we don't want the change count incremented in the case when the user selects 'cancel' from the edit step.We will have to modify our edit steps to do this, but the current behavior is sufficient.

Josh W.
Certified TestStand Architect
Formerly blue
CyGa
Active Participant

The current behavior is sufficient as long as the workaround is sufficient. Kudo-ing would be really helpful for those who are expecting this behavior to change ! Most of the time the number of kudos is not relevant on how important a change is needed... but it seems that it's NI barometer...

CLA, CTA, LV Champion
View Cyril Gambini's profile on LinkedIn
This post is made under CC BY 4.0 DEED licensing
பரத்_குமார்(bharathkumar)
Member

Does this  sequenceFile.AsPropertyObjectFile.IncChangeCount() work for step Name. Sequence editor doesn't reflect name. It does after editing once again 1 iteration lag(executes in the next edit click).

Thanks & Regards,
Bharath Kumar
GCentral
WireWeaver
Active Participant
Status changed to: Declined

I'm declining this idea due to lack of community support.

https://www.linkedin.com/in/trentweaver