10-08-2019 06:42 AM - edited 10-08-2019 06:43 AM
Hello,
I currently have a rather large set of sequence files with multiple sequences within each one that either call each other or call LabVIEW VIs. The paths are all static / absolute.
The issue I now have is the customer wants to store all these in another location, therefore the absolute paths are now wrong.
Is there a quick way I can iterate through all the sequences and change all the initial part of the path to the new one?
IE from D:\Teststand\ to \\NAS\Teststand
I can't really do it manually as there is probably 200 sequences files with at least 50 sequences within them
Thanks in advance
Solved! Go to Solution.
10-08-2019 10:08 AM
The Find/Replace in Files tool will do this quite easily.
You can point it to a directory and it will look in all of the files. Or you can even recurse through subsequence calls if you have a top level MainSequence.
To get that dialog you just go to Edit>>Find/Replace in Files... (or Ctrl+Shift+F)
Hope this helps,
10-08-2019 10:52 AM
Unfortunately this does not affect the path of VI locations or sequence locations.
Tried that one 😞
I've also tried converting to XML in the hope it's in the XML code for easy change but the same issue exists.
10-08-2019 10:58 AM
I've attached the parts I want to change on an example vi call.
Paths are totally wrong here but it's equivalent to changing from c drive to d drive for example.
Remember that there are loads of them and need a automated solution if possible
10-08-2019 11:05 AM
In your image you just need to change your search directories to point to the NAS location and not your local drive. You cannot change the paths in the grayed boxes. Those are just indicators on where the file was found in your search directories.
You made it sound like you had hard coded absolute paths in the white boxes. If you are just putting the name of the file then it is up to the search directories to find the file.
Change your search directories such that they won't look in the C:\Users\mwebster\Desktop folder at all.
Hope this helps,
10-08-2019 11:58 AM
If it is search directory based is there any way I can change my search directory based on what I'm about to run just in case they want to go back a version?
IE run something in a sequence that edits these directory before the sequence is ran?
Ideally it would be good that it does this only for the current execution as there may be confusion between versions.
10-08-2019 01:18 PM
You can use environments: http://www.ni.com/tutorial/54263/en/
Or you can change the search directories through the TestStand API. You will need to call incchangecount and save so that TestStand will reload it. Look at the Engine.SearchDirectories class. There is a Reload() method there as well.
10-08-2019 01:41 PM
If I make changes at the engine level as you have suggested will they be lost on termination? That would be the ideal for me so it always revert to the currently working set while I'm debugging
10-08-2019 03:23 PM
If it is only needed for debug then I recommend just manually changing it through the menu and then when you are done just change it back.
10-15-2019 01:12 PM
@~jiggawax~ wrote:
You can use environments: http://www.ni.com/tutorial/54263/en/
Or you can change the search directories through the TestStand API. You will need to call incchangecount and save so that TestStand will reload it. Look at the Engine.SearchDirectories class. There is a Reload() method there as well.
I used this method via teststand separate sequence and using C# API to get the engine search directories and toggle between two sets as a more permanent solution.