NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Search Class : UpdateForReplace

Thanks a lot,  Ray.

Sorry for the delay. TS 3.5 is not installed on my PC (TS 3.2).  I had to find another PC with TS 3.5 to do the tests.

I deal only with PropertyNames ans String values.
I do the search on the selected sequence file.

I did some changes to your example :
  • You should call UpdateFoReplace for all cases (not only for string values) : An error occurred if you replaced the name of a property and then you want to replace the value of this property (=next match) --> The property path doesn't exist any more.
In your example :
If the value of Locals.cow is "This is a cow."
First match => Locals.Dog = "This is a cow."
Second match => Error if you did not call UpdateForReplace : Locals.cow doesn't exists any more.
But the second match works if you call UpdateForReplace when you replace Locals.cow by Locals.Dog.
  • And I added the following case :
if Locals.matchElement == 1 and Locals.subPropertyIndex == -1 then I change the name of the property whose path is Locals.propertyPath.

Tell me if I made some mistakes.

Bruno

0 Kudos
Message 11 of 11
(954 Views)