cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • DownloadSemiconductor Toolkit: Tools to create wafer maps, add wafer geometry to graphics, explore die defects & compare wafers.
  • Discovery Summit 2026: Early User Edition - September 23-24.Register. It's free.
  • See how to design an experiment, explore factor-response relationships, assess tradeoffs, and ID best settings. Register for Sep. 11 Mastering JMP.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
miguello
Level VII

How to include script using relative path?

I have two scripts, main.jsl and dosomething.jsl that are next to each other in the same folder.

Main script has this in it:

relativePath = "./";
absolutePath = "c:\Users\myUser\Scripts\";
dosomething = Expr( Include( relativePath || "dosomething.jsl" ) );

This dosomething does something all over the script, it's very handy to edit dosomething.jsl WHILE still running the main script.

So, when I do that using relativePath as written above - JMP crushes. But works fine when using absolutePath.

 

Now, I don't want to use absolute path. How can I use relative path in Include statement?

For instance, this works fine for Logo.png that lies next to these two scripts:

Picture Box( Open( "./Logo.png", png ) )

If relative paths not working with Include, is there any way to access the absolute path for the currently running script?

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
miguello
Level VII

Re: How to include script using relative path?

And again, formulating and writing down the question gave me an idea where to look for the answer.

So this works:

 

relativePath = Get Default Directory();
absolutePath = "c:\Users\myUser\Scripts\";

dosomething = Expr( Include( relativePath || "dosomething.jsl" ) );

 

View solution in original post

2 REPLIES 2
miguello
Level VII

Re: How to include script using relative path?

And again, formulating and writing down the question gave me an idea where to look for the answer.

So this works:

 

relativePath = Get Default Directory();
absolutePath = "c:\Users\myUser\Scripts\";

dosomething = Expr( Include( relativePath || "dosomething.jsl" ) );

 

jthi
Super User

Re: How to include script using relative path?

Other function which might be helpful is Convert File Path()

-Jarmo

Recommended Articles