NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

find/replace parameter types

Hello,

 

is it possible to find/replace the types of the parameters of sequences? When I tried "Find" for the name of a type, it returned the location of the type definitions, but not where they were used as parameters of sequences (this is TestStand 4.1).

 

Regards

 

Peter

 

0 Kudos
Message 1 of 4
(3,204 Views)

Hi

 

Maybe you will find this thread interesting

http://forums.ni.com/ni/board/message?board.id=330&message.id=25834&query.id=977803#M25834

 

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 2 of 4
(3,198 Views)
You can find all instances of a data type as follows:

 

On the second tab of the find in files dialog (not the find dialog, only the find in files one) there is an option to search only in instances of specific types. If you specify a type there, you can then use a search string that will match anything (i.e. a regular expression like .*) and set the filter to match names. Don't forget to reset the filter settings in the find in files dialog back to their defaults when you are done by using the Reset to Defaults button on that second tab and doing another search as it's easy to forget you made this setting change the next time you use find in files.

NOTE: Replace will not be useful for you in this case. You will have to manually make the edits at each location.

 

Another idea:

If you really need to do search and replace in a more automated way you can use the TestStand API to write a program or sequence that iterates through all of the sequences in a sequence file and looks at all of their parameters and replaces the parameters of the type you are looking for with one of the new type you want.

 

Yet another idea:

Make sure only the old type is in memory and not the type you want to change it to. Then, with all of the files you care about opened, rename the old type to the same name as the new type. This should rename the type definition used by all of the instances. Then save and unload all files which use that type. Load a file with the new type in it, then open the files you just saved. You should get a type conflict dialog. Choose the "use already loaded type" option, then resave the files.

 

Hope one of these will work for you.

-Doug

0 Kudos
Message 3 of 4
(3,172 Views)

Thanks for all the help.

 

Yes, the search options work; I guess if the scenario comes up more often, I will go the way of the second solution, make a tool program for it.

The third suggestion is probably a little hard to keep under control with several people working on projects, re-using types.

 

Peter

0 Kudos
Message 4 of 4
(3,121 Views)