cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
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)