cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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)

Recommended Articles