NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand Updating Fixed Paths

Solved!
Go to solution

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

Message 1 of 10
(3,336 Views)

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. 

FindReplace In File.png

 

To get that dialog you just go to Edit>>Find/Replace in Files... (or Ctrl+Shift+F)

 

 

Hope this helps,

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 10
(3,292 Views)

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.

0 Kudos
Message 3 of 10
(3,284 Views)

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

 

 

 

0 Kudos
Message 4 of 10
(3,278 Views)

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,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 10
(3,275 Views)

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.

0 Kudos
Message 6 of 10
(3,266 Views)
Solution
Accepted by topic author RTC_Tom

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.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 7 of 10
(3,253 Views)

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

0 Kudos
Message 8 of 10
(3,245 Views)

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. 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 9 of 10
(3,223 Views)

@~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.

0 Kudos
Message 10 of 10
(3,151 Views)