cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

JMP Wish List

We want to hear your ideas for improving JMP. Share them here.
Choose Language Hide Translation Bar
0 Kudos

Include use the parent default directory.

I would love it if I could force include() to use the default directory of the parent (or whatever I have set it to, instead of creating its own).  

For example

Names default to here(1);
dir = convert file path("$DESKTOP\TestDefaultDirectory\");
create directory(dir);
parent = JSLQuote(
	Set Default Directory(convert file path("$DESKTOP"));
	print("Parent");
	show(Get Default Directory());
	
	include("TestDefaultDirectory\child.jsl");
	
	print("Parent");
	show(Get Default Directory());
);

save text file(convert file path("Parent.jsl", base(dir)), parent);

child = JSLQuote(
	print("Child");
	show(Get Default Directory());
);
save text file(convert file path("Child.jsl", base(dir)), child);
nw = open(convert file path("Parent.jsl", base(dir)));
script = nw[scriptbox(1)];
script << Run();

Returns

"Parent"
Get Default Directory() = "/Desktop/";
"Child"
Get Default Directory() = "/Desktop/TestDefaultDirectory/";
"Parent"
Get Default Directory() = "/Desktop/";

I want the child to also return "/Desktop/"

 

1 Comment
Ryan_Gilmore
Community Manager
Status changed to: Archived
We are archiving this request. If this is still important please comment with additional details and we will reopen. Thank you!