NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to force GetRelativePathFromAbsolutePath method to use search directory

I want to use a GetRelativePathFromAbsolutePath method to get a sequence file relative part based on the order of search directories. The prototype is as follows:

 

 

Engine.GetRelativePathFromAbsolutePath (absolutePath, searchContext, relativePath, searchDirectoryPath)

 

 

where searchContext is a Variant specifying "the directory of the sequence file, which may also be searched for relative paths". This parameter is strange. Help states that it "may also be searched", but from experiments, it looks like this parameter is required and that the result of this method is a relation between absolutePath and searchContext. It can't be Nothing and it should be specified as a reference (in example *ThisContext.SequenceFile - mind the asterisk). It should "return the relative path with respect to the search directory" but instead it returns the path relative to searchContext. So, how this method shall be used? For example, how to return sequence file path relative to RunState.Engine.CurrentWorkspaceFile.Path?

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 1 of 1
(549 Views)