10-27-2021 07:15 AM
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?
05-08-2026 02:43 PM
Did you ever find a solution to this? I'm trying to use it from C# but the story is the same; the documentation on this method definitely needs some improvement.