NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Teststand 1.03 -> How can I get the sequence file path into an expression?

The sequence file will be located at different locations on different computers. I need the base address of the sequence file to get to the correct limits file. How can I get the sequence file path into a string-local expression.
Thanks
0 Kudos
Message 1 of 3
(5,358 Views)
Hi Raceman,

Use the FindFile in an expression step eg.

Locals.found= FindFile("Sequence File.seq", TRUE, Locals.path)

Again the sequence file you are looking for can also be held in a variable eg

Locals.found= FindFile(Locals.SeqFileToFind, TRUE, Locals.path).


Hope this helps
Ray Farmer
Regards
Ray Farmer
0 Kudos
Message 2 of 3
(5,358 Views)
As Ray described, the FindFile expression function and TS API method will seach all TS search directories and return to you the path of your file, assuming the file is located in the search directories.

If you just want the path of a TS file that you have a reference to then there is a faster, easier method. You can use the Path property of the PropertyObjectFile class. In the attached example I use an AcitiveX Automation adapter step to call Path on the property RunState.SequenceFile. This returns the path to the current executing sequence file. Note that if you have not yet saved the sequence file then the path will be empty. In a subsequence step I strip off the file name leaving the root path of the file.
Message 3 of 3
(5,358 Views)