NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Property loader working directory

When editing the property loader source there is an option to use an expression browser. I would like to find the name of the directory from which the current sequence was loaded and then go up one level. IE if current directory is c:\a\b\c I want c:\a\b. From there I can append my subdirectory and file name. I found RunState.SequenceFile.Path but it supplies the full path including file and extension. Even without file and extension I need to truncate the last directory.

 

Is there a good way to do this in test stand or should I call a VI to do this?

 

Thanks,

 

jvh 

0 Kudos
Message 1 of 3
(3,066 Views)

Looks like the plain ole expression "..\\Limits\\Limits_" + StationGlobals.BoardType + ".txt" will work in this case. Though I think there are cases where one could use the current directory name.

 

jvh 

0 Kudos
Message 2 of 3
(3,062 Views)

This expression should work in the 'Use Expression To Specify File' in the Property Loader.  Replace 'c' with your directory and Limits.txt with your 'Limits' file.

 

Left(RunState.SequenceFile.Path, Find(RunState.SequenceFile.Path,"\\", 0, False,TRUE) ) + "\\c\\Limits.txt"

 

 

-- Paul Holzrichter

 

Message 3 of 3
(3,046 Views)