Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Automatically Replacing Absolute Paths with Paths Relative to the TestStand Search Directories

1 ratings | 5.00 out of 5
Print

Downloads

Filename: analyze_paths.zip
Requirements: View

For each step in a sequence that calls a code module, TestStand stores the module name and path as properties of the step. The path can be an absolute path or a path that is relative to a directory in the TestStand search directories. When you distribute a sequence file, you also must distribute the appropriate step modules and their support files to the target system. Also, you must ensure that sequence files can locate their step module files using the path information stored with each step.

If you distribute a sequence file whose steps use absolute paths to their code modules, TestStand will not find the code modules unless the target system contains the same directory structure as the development machine. National Instruments recommends that you use relative paths whenever possible. When you use relative paths, you can simply change the TestStand search directories on the target machine to allow TestStand to locate code modules that have been stored in a different directory on the target machine than the directory in which they are stored on the development machine.

You may find after developing your sequences that you should have used relative paths instead of absolute paths in specifying the location of your code module. This example allows you to select multiple sequence files to be analyzed. For each step in the selected sequence file(s) that calls a code module, this utility checks the path used to locate the module. If it is an absolute path, the tool replaces it with a relative path. Refer to the attached Readme file for more information.

To run the example, complete the following steps:
1. Unzip the attachment.
2. Run the Use Relative Paths.seq sequence file.
3. Follow the instructions on the screen.

If you want to use the example as a permanent tool, complete the following steps:

1. Create the folder \Components\User\Tools\Analyze Paths\ and unzip the attachment into it.
2. From the Sequence Editor, select TOOLS»CUSTOMIZE.
3. Use the following information to complete the window that appears.
-----Item New Expression: Analyze Paths (or any name you want for the tool).
-----Sequence File: Use Relative Paths.seq (Browse to the new folder you created and select this sequence file).
-----Sequence: Seq Files to Analyze (Select this sequence from the ring control).
4. Click OK.
5. Each time you select TOOLS>>ANALYZE PATHS (or the name you gave to the tool), the example runs

Requirements


Filename: analyze_paths.zip

Software Requirements


Application Software: LabWindows/CVI Full Development System 5.5, NI TestStand Development System 2.0
Language(s): C

 
1 ratings | 5.00 out of 5
Print

Reader Comments | Submit a comment »

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).