NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Show custom step Description from a local variable.

Hi Patrick, thank you for your interest...

I agree with you, it should work, but it doesn't (or seems to be not fully functional....)

In fact, I create my own step type, and I change the description statement, including some step variables for description.

For example, I create a new step type, making a copy of native pass/fail step. (it's just for the example, the step type doesn't matter)
So, I add some step variables (in the right part of step type panel, you've got a list of parameters in relationship with the selected step, like result container and so on...) like Description, Name, etc...

So, when I add a new step in TestStand sequence editor, if I open the treeview, I'm able to see my new variables "Step.Description", "Step.Name",...

So, I re-open step type panel, and change the description statement. Let's enter the folowing expression: ((Step.Name!="")?(Step.Descirption + " of " + Step.Name):("N/A")).
And then, I decide to create an "Edit" substep property, calling an external dll (build with CVI) to change these values with a nice edition panel!

So I enter the name of my Dll, giving parameters (Step.Description,...)

I save everything, and go back to sequence editot of TestStand.

If I right-click and select "Edit..."; my edition panel (from the Dll) opens, and I cam modify existing values. When I exit this panel, the step description in the sequence editor DO NOT change automatically.

At this moment, if I opens the sequence editor treeview, I can see that values changed (telling to me that my dll function works). And, Oh, so magic, when I close the treview, TestStand updates the description of my step! Strange.

For the moment, the only solution I found is to pass the tTestData structure when I call my edition function, and inside the dll, call the "TS_IncSequenceFileChangeCount (testData->seqContextCVI, 0);" function.

If you're usinbg that, immediatly after exiting the external dll, TestStand upadtes all the description and indicates you must save the sequence because it changed.

I don't know why TestSand engineers solutions seems to work only in NI offices...

For information, I use CVI 7.1 with TestStand 3.1 with patch 3.1ff
0 Kudos
Message 11 of 12
(1,212 Views)
Hey Gaadek,

I did not realize you were trying to change the description at edit time.  The reason the description is not updating is because the sequence editor needs to redraw to update the value.  The best way to do this is to use the command that you are already using to increment the change count.  This tells TestStand that a change has been made and the window needs to refresh.  If you want to get rid of the message asking you to save the sequence file, you can use the sequencefile method, Save.

If you are attempting to do this at run time, it should automatically update the description as soon as one of the steps finishes.
Pat P.
Software Engineer
National Instruments
0 Kudos
Message 12 of 12
(1,188 Views)