06-07-2011 08:34 PM - edited 06-07-2011 08:39 PM
Hi Guys:
i met a problem when i try to call a dll using relative path ,for example C:\test.dll , as my understanding teststand will record C:\ as a relative path ,but this information will only write into teststand not the seq file , now if i want to use the some dll name "test.dll" but different relative path, for example D:\ , is there anyway i can do to change the relative path which was recorded in teststand ? or is there anyway for me to check what relative paths were recorded in teststand?
thanks
06-08-2011 12:32 AM
If your path starts with C: or 😧 then it is most likely not a relative path but an absolute path. The difference?
Absolute paths are the exact path to a file. For instance C:\test.dll is an absolute path to a file called test.dll located exactly in the C drive.
Relative paths are a path that is accessible from your current location. So let's say my sequence file was located in C:\Tests\MySequence.seq. A relative path to test.dll would be ../test.dll.
Anywho, TestStand runs on search directories. If you go to Configure>>Search Directories.. you will see a list of directories that TestStand uses to find files. If you are using a relative path in a step then the chances are you need to have a path to the folder containing your code module in the search directories. TestStand starts at the top of the list and goes to the bottom until it finds the file (or doesn't find the file, in which case you'll get an error or it will grab a file named the same thing but not the one you wanted). Also, if you have the Search Subdirectories box checked on any of the paths in the list then TestStand recursively searches all the children of that folder. You can see why it would be a bad idea to put C:/ in the list and check the Search Subdirectories box. This could take eons to search for a file as some HDDs could be terabytes of information.
To answer your question directly- Look for the path that would lead to your file. Change it to the new path you want to lead to your file.
http://digital.ni.com/public.nsf/allkb/9155CB2DEA53426886256BC90056DDA3
http://zone.ni.com/devzone/cda/tut/p/id/7559#toc2 Section called Search Directory configuration
Hope this helps some,
06-08-2011 09:44 AM
I just want to add that the recommended/preferred way to use relative paths to your code modules in sequence files is to make them relative to your sequence file. Paths relative to your sequence file are already searched by default. It is not recommended to be adding a lot of search directories. If you are not careful it is easy to get into trouble by creating too many seach directories and/or making them searched recursively since it might then not be so obvious where your files will be found (especially if you have more than one file with the same name) and it can hurt performance when teststand has to search for the files.
Hope this helps,
-Doug
06-20-2011 01:54 AM
Is there any way , using any API to change it ? instead of changing it in the configure dialog box
06-20-2011 09:46 AM
Changing what specifically?
-Doug