I have a repo in following structure:
repo:
name.jsl
dir_A
root.jsl
dir_B
example.jsl
root.jsl
--------------------------------------
As repo is cloned for each user in different location. I have generated a a script which calls Python and always find the absolute path of the repo and set it as root.
cur_dir = Substr( Get Default Directory(), 2, 999 );
cur_dir = Substitute( cur_dir, "/", "\" );
show(cur_dir);
_path_script = cur_dir || "find_home_directory.py";
show(_path_script);
home_dir = RunProgram(
executable( "python" ),
options( _path_script),
readfunction( "text" )
);
Set Path Variable( "root", home_dir );
Get Path Variable("root");
example.jsl
Include("../dir_A/root.jsl");
Get Path Variable("root");
_var = "$root/name.jsl"
I checked and found the root is setup correctly and pointing to right directory.
I'm getting error for _var. Error with file: Path is invalid: