Hello,
I've been using query builder and graph builder to put together some scripts that constantly pull data off a server, plot, and save results (in JMP 13). Recently, I've been trying to tie several of these scripts into a single script that runs all of them at once using Include(), which works fine. The problem I'm facing now is all the directories have been hard coded, and I'd like to use something like: Get Default Directory() so that this broader collection of scripts can be moved onto other computers.
Unfortunately, I've run into the following problems:
-When Get Default Directory() is used within the 'Post-Query Script' it returns '/ ' , no matter where this script is saved.
-When saving data tables/graphs created in the post-query script that to variables, those variables don't seem to exist (or are not accessible) outside of the
post-query script.
-Any variables created outside of the post-query script cannot be used inside it.
// Main File
directory = Get Default Directory();
fileNames = Files In Directory( directory );
For( iFile = 1, iFile <= N Items( fileNames ), iFile++,
filename = fileNames[iFile];
If( Ends With( filename, ".jsl" ),
Include( directory || script_folder || filename, invisible );
);
);
// Example Post-Query File section
gb = Graph Builder(
// graph details
);
// directory = Get Default Directory(); // Another method attempted
myPath = directory || "Report\";
myName = "Example";
fileName = myPath || myName || ".pptx";
myTemplate = directory || "Template.pptx";
Report( gb ) << save presentation( fileName, Template( myTemplate ), Outline Titles( "Hide" ) );
gb << close window;
Close All( data tables );
Any thoughts?