<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418465#M66742</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your script looks extremely useful, especially as I am relatively new to JMP (coming from MATLAB)..&lt;/P&gt;&lt;P&gt;However, I do not understand you comment on "i&lt;SPAN&gt;f the scripts are not saved in the table&lt;/SPAN&gt;".&lt;/P&gt;&lt;P&gt;My scripts are saved and do not change for analysis of new test data (as mentioned in my OP).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I only need specific charts from each script and only some calculated analysis data (such as median and std-dev for example, not other parameters which JMP also calculates) to go to the journal. How to achieve this in JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 15 Sep 2021 15:59:49 GMT</pubDate>
    <dc:creator>Neo</dc:creator>
    <dc:date>2021-09-15T15:59:49Z</dc:date>
    <item>
      <title>How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/417987#M66709</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have bunch of scripts which I use to analyse the product test data in JMP.&lt;/P&gt;&lt;P&gt;The scripts generally call multiple columns in the test data file.&lt;/P&gt;&lt;P&gt;Each test run is tagged by an ID and only this ID changes for pulling the new test run data into JMP - the scripts used for data analysis remain same.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For sharing my analysis I (currently) manually create a PPT slide pack with the charts and analysis data (such as median &amp;amp; std-dev etc.).&lt;/P&gt;&lt;P&gt;I would like to move to JMP journal.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was wondering if it is possible to have a script which would (either by running my other analysis scripts automatically or without) send the charts and analysis data to a JMP journal? If this is possible, could I please get some help with example script to put together such a journal?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:17:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/417987#M66709</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-06-11T11:17:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418316#M66733</link>
      <description>&lt;P&gt;A web search for 'scripting a JMP journal' will give you more examples, but this might get you pointed in the right direction:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);

dt = Open("$SAMPLE_DATA\Big Class.jmp");

// New Journal with a couple headings
nw = New Window("My Journal", &amp;lt;&amp;lt;Journal,
    obHist = Outline Box("Histograms"),
    obXY = Outline Box("Scatterplots")
);

// Save graphs to the journal
obHist &amp;lt;&amp;lt; Append(
	dt &amp;lt;&amp;lt; Distribution(
		Nominal Distribution( Column( :name ) ),
		Nominal Distribution( Column( :age ) ),
		Nominal Distribution( Column( :sex ) ),
		Continuous Distribution( Column( :height ) ),
		Continuous Distribution( Column( :weight ) ),
		Histograms Only
	)
);

obXY &amp;lt;&amp;lt; Append(
	dt &amp;lt;&amp;lt; Graph Builder(
		Size( 867, 280 ),
		Show Control Panel( 0 ),
		Variables( X( :height ), Y( :weight ), Group X( :age ) ),
		Elements( Points( X, Y, Legend( 5 ) ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Sep 2021 20:44:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418316#M66733</guid>
      <dc:creator>ih</dc:creator>
      <dc:date>2021-09-14T20:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418412#M66739</link>
      <description>&lt;P&gt;Thanks. Yes, this does point me to an approach I could follow.&lt;/P&gt;&lt;P&gt;However, I note that the data file loading script and the graph plotting/analysis scripts etc need to be written in within the script for generating the journal.&lt;/P&gt;&lt;P&gt;In my case, I already have separate scripts which loads the data, plots the necessary graphs and generates the necessary analysis.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I there a way to &lt;STRONG&gt;reference existing scripts&lt;/STRONG&gt; from within the journal script without writing them again inside the journal script?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 10:35:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418412#M66739</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2021-09-15T10:35:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418440#M66741</link>
      <description>&lt;P&gt;If you don't want to modify your existing scripts, you could try this kind of approach. If the scripts are not saved in the table, look at the JSL 'Include()' function:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Returns a list containing the names of all the currently open windows in a session
namesOfOpenWindows = 
Function({}, {DefaultLocal},
	openWindows = Window();
	openWindowNames = {};
	For(w=1, w&amp;lt;=NItems(openWindows), w++, InsertInto(OpenWindowNames, OpenWindows[w] &amp;lt;&amp;lt; GetWindowTitle));
	openWindowNames;
);

// Which windows are open now?
preWindowList = namesOfOpenWindows();

// Open a table
dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Find out what scripts are in the table
dts = dt &amp;lt;&amp;lt; GetTableScriptNames;

// Run every script
for (s=1, s&amp;lt;=NItems(dts), s++, dt &amp;lt;&amp;lt; runScript(dts[s]));

// Which windows are open now?
postWindowList = namesOfOpenWindows();

// Journal the contents of each 'new' window
for(w=1, w&amp;lt;=NItems(postWindowList), w++,
	thisWindow = postWindowList[w];
	if (!Contains(preWindowList, thisWindow), Window(thisWindow) &amp;lt;&amp;lt; Journal);
	);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 12:56:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418440#M66741</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2021-09-15T12:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418465#M66742</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your script looks extremely useful, especially as I am relatively new to JMP (coming from MATLAB)..&lt;/P&gt;&lt;P&gt;However, I do not understand you comment on "i&lt;SPAN&gt;f the scripts are not saved in the table&lt;/SPAN&gt;".&lt;/P&gt;&lt;P&gt;My scripts are saved and do not change for analysis of new test data (as mentioned in my OP).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I only need specific charts from each script and only some calculated analysis data (such as median and std-dev for example, not other parameters which JMP also calculates) to go to the journal. How to achieve this in JSL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 15:59:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418465#M66742</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2021-09-15T15:59:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418466#M66743</link>
      <description>&lt;P&gt;The selecting of specific reports from your output is fairly simple, but quite specific.&amp;nbsp; I suggest that you take the time to read the Scripting Guide to get started.&amp;nbsp; Then your specific questions about how to get the precise reports will either be answered by the documentation, or you will be able to provide a more detailed question for the community to answer.&lt;/P&gt;</description>
      <pubDate>Wed, 15 Sep 2021 16:11:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/418466#M66743</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-09-15T16:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/420997#M66972</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;. I am trying to use your script in the following way.&lt;/P&gt;&lt;P&gt;I have written a script which loads the data file and plots various charts.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;partID = "part012"; // specifies part ID
DataTable = getDataTable4WfrID2(partID,partID);  // loads test data table corresponding to the partID and names it the same as partID
include ("allGraphPlotter.jsl"); //plots all necessary charts&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The above script works as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then (on fourth line above), I tried to &lt;EM&gt;include&lt;/EM&gt; your script as below (note the commented lines) for sending the charts to journal but is not working.&lt;/P&gt;&lt;P&gt;Where am I going wrong (perhaps my include statement or the function call e.g. output = &lt;CODE class=" language-jsl"&gt;namesOfOpenWindows()&lt;/CODE&gt;)?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;NamesDefaultToHere(1);

// Returns a list containing the names of all the currently open windows in a session
namesOfOpenWindows = 
Function({}, {DefaultLocal},
	openWindows = Window();
	openWindowNames = {};
	For(w=1, w&amp;lt;=NItems(openWindows), w++, InsertInto(OpenWindowNames, OpenWindows[w] &amp;lt;&amp;lt; GetWindowTitle));
	openWindowNames;
);

// Which windows are open now?
preWindowList = namesOfOpenWindows();

// Open a table
//dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Find out what scripts are in the table
//dts = dt &amp;lt;&amp;lt; GetTableScriptNames;

// Run every script
//for (s=1, s&amp;lt;=NItems(dts), s++, dt &amp;lt;&amp;lt; runScript(dts[s]));

// Which windows are open now?
postWindowList = namesOfOpenWindows();

// Journal the contents of each 'new' window
for(w=1, w&amp;lt;=NItems(postWindowList), w++,
	thisWindow = postWindowList[w];
	if (!Contains(preWindowList, thisWindow), Window(thisWindow) &amp;lt;&amp;lt; Journal);
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 26 Sep 2021 18:17:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/420997#M66972</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2021-09-26T18:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/421188#M67001</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;. I have now done some more tests. This part of your script is not working.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;for(w=1, w&amp;lt;=NItems(postWindowList), w++,
	thisWindow = postWindowList[w];
	if (!Contains(preWindowList, thisWindow), Window(thisWindow) &amp;lt;&amp;lt; Journal);
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Everything above this in your script gives expected results, but only if I comment the above for loop block.&lt;/P&gt;&lt;P&gt;Also, I do not get the charts into the journal, so only the code above the for looks seems to work as expected unless I am doing something wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 21:17:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/421188#M67001</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2021-09-27T21:17:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/421456#M67029</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp;, If I try the following way I do not get a list of open chart windows (in log) unless I comment the for loop (at the end).&lt;/P&gt;&lt;P&gt;Also, no journal file gets generated. Where am I making the mistake?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I define a function (called getOpenWindowNames.jsl) and execute it&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

// Returns a list containing the names of all the currently open windows in a session
namesOfOpenWindows = 
Function({}, {DefaultLocal},
	openWindows = Window();
	openWindowNames = {};
	For(w=1, w&amp;lt;=NItems(openWindows), w++, InsertInto(OpenWindowNames, OpenWindows[w] &amp;lt;&amp;lt; GetWindowTitle));
	openWindowNames;
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Then call the above function in another script&amp;nbsp; as&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
//Clear Symbols();
include ("getOpenWindowNames.jsl");

// Which windows are open now?
preWindowList = namesOfOpenWindows();

// Open a table
dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Find out what scripts are in the table
dts = dt &amp;lt;&amp;lt; GetTableScriptNames;

// Run every script
for (s=1, s&amp;lt;=NItems(dts), s++, dt &amp;lt;&amp;lt; runScript(dts[s]));

// Which windows are open now?
postWindowList = namesOfOpenWindows();

//// Journal the contents of each 'new' window
for(w=1, w&amp;lt;=NItems(postWindowList), w++,
	thisWindow = postWindowList[w];
	if (!Contains(preWindowList, thisWindow), Window(thisWindow) &amp;lt;&amp;lt; Journal);
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 21:47:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/421456#M67029</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2021-09-27T21:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I script for sending charts and analysis data to the journal without manually running existing scripts for charts/analysis?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/421465#M67034</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/3605"&gt;@ian_jmp&lt;/a&gt;&amp;nbsp; -&amp;nbsp; I broke down your suggested code to track down what is not working. It appears that the issue is in the line in the for loop&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;thisWindow = postWindowList[w];&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which in my case reports in the log (when a simple script is run to plot a chart)&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;"part012 - Graph Builder"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;for the first chart item not in&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="jsl"&gt;preWindowList &lt;/LI-CODE&gt;&lt;P&gt;Then just running&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Window(thisWindow) &amp;lt;&amp;lt; Journal&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;does not put the window called&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;"part012 - Graph Builder"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;into a journal file. Is there an issue with the name &lt;CODE class=" language-jsl"&gt;"part012 - Graph Builder" itself due to which this chart does not get send to a journal?&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Sep 2021 22:42:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-script-for-sending-charts-and-analysis-data-to-the/m-p/421465#M67034</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2021-09-27T22:42:32Z</dc:date>
    </item>
  </channel>
</rss>

