cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
Dib-Dey
Level III

can't find the file path generated by Set Path Variable

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:

 

 

 

1 REPLY 1
Byron_JMP
Staff

Re: can't find the file path generated by Set Path Variable

try.  

 

get path variable("$root");

 

in your example

Get Path Variable("root");_var = "$root/name.jsl"

JMP is trying to evaluate _var="$root/name.jsl"

 I don't think the first char of the var name can be a special character or number.

 

 

JMP Systems Engineer, Health and Life Sciences (Pharma)