From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Sequence Directory for property loader

Hi,
 
Im using the property loader in order to retrieve test parameters for my different testroutines.
 
How do i get the directory where my sequence file is placed, so that my property loader wont care where the entire Folder is dropped and launched from, when trying to load my settings.
 
I know i can do this "RunState.SequenceFile.Path", but thats the FULL path to my sequence file, what if i only wanted the directory where the sequence file is placed.
 
It just seems obvious that there should be a function for this.
 
(Vers. 3.1)
 
Thx in Advance
0 Kudos
Message 1 of 4
(4,481 Views)

Hi,

The only way is to get the full path and strip the sequencefile filename and extension.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 4
(4,471 Views)

I know this thread is a few years old but I thought I would append to it for the bennifit of anyone else looking for this specific answer, like I was.

 

In your property loader setup, on the source tab, select "Use Expression To Specify File" and type in:

 

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

 

Where Limits.txt is whatever file name you want to use and the properity loader will look for the file in the same directory as the loaded sequence file.

 

Cheers

Gregory Osenbach, CLA
Fluke
Message 3 of 4
(4,069 Views)

Hello,

 

10 years later...

 

an I get the code to read "RunState.SequenceFile.Path" please ? 

 

I did this, but I get an error saying that the variable SequenceFile didn't exist :

TS_PropertyExists(SeqContext, &errorInfo, "RunState.ThisContext.SequenceFile.Path", 0, &propertyExists);

	if (propertyExists)
	{
		TS_SequenceGetName (SeqContext, &errorInfo, &sequenceName);

    	        TS_PropertyGetValString(SeqContext, &errorInfo, "RunState.ThisContext.SequenceFile.Path", 0, &stringVal);
	}
0 Kudos
Message 4 of 4
(3,377 Views)