NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to store a relative path in a global variable

Solved!
Go to solution

Hi,

 

I'm using Teststand 2013 and Labview 2013

 

Is it possible to define a relative path for a global variable in the Teststand? Ex. "..\vector1.hws"

Or I should use the Labview functions to solve this issue?

 

 

.relative_path.jpg

 

Thanks,

 

 

0 Kudos
Message 1 of 4
(3,764 Views)
Solution
Accepted by topic author engfpe

Paths are so much easier to manipulate in LabVIEW.  So you could store the relative path as a string and then use LabVIEW to make the absolute path.

 

I typically store a folder in a global variable and then I can just concatinate the strings to build the absolute path.  For example:

FileGlobals.Folder = "C:\\foo\\bar\\",
Locals.Path = FileGlobals.Folder + "blah.txt"

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 4
(3,759 Views)

If the file exists within your search directories you can use Engine.FindFile.

 

Also, you can use Engine.GetTestStandPath to get a base TS path and then make relative additions as crossrulz suggested.

 

Regards,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 4
(3,752 Views)

Yes. It seems that it is easier to manipulate a file path in Labview.

I will store the file name in the TestStand variable and use the Labview to find the absolute path.

 

Thanks

0 Kudos
Message 4 of 4
(3,739 Views)