Script publish in JMP Live 16 issueHello,
I have issue to automate publish on JMP 16. I create "MyConnection" as shown below

I have a JMP Query with a Post-Query script which do SPC analysis and finish by 1) printing PowerPoint (to ensure everything went well) and 2) publishing in JMP Live 16 (should but do not).
Snapshot of the script:
....
// Save graphs as PowerPoint
graph1 << Save Presentation( "C:\Users\fraemr\OneDrive - SAS\Attachments\11111111 Data\DataBase\graph1.pptx" );
graph2 << Save Presentation( "C:\Users\fraemr\OneDrive - SAS\Attachments\11111111 Data\DataBase\graph2.pptx" );
graph3 << Save Presentation( "C:\Users\fraemr\OneDrive - SAS\Attachments\11111111 Data\DataBase\graph3.pptx" );
// Create the web report element to hold the graphs
webrpt = New Web Report();
webrpt << Add Reports( {graph1,graph2,graph3},Title( "SPC_Tablet_May" ) );
jmplive = New JMP Live( Connection( "MyConnection" ),Prompt( If Needed ) );
jmpliveresult = jmplive << Publish( webrpt, API Key("9l0ZWKL0VDqlzFvht8dNn") );
report = jmpliveresult << As Scriptable();
dt2<< Clean up windows
Close All (data tables, nosave);
<< Run
What is wrong ?
Emmanuel
Re: Script publish in JMP Live 16 issueHi Emmanuel,
For a start, remove the API key in the Publish. That is no longer used that way. That is why we associate the API Key with the Live Connection, so you don't have to enter that.
I might also put in a wait(0) after that Publish to give it time to process.
Brian
Re: Script publish in JMP Live 16 issueHello Brian,
it still doesn't work. I previously tested w/o API key and re-tested with wait (I tried wait(0) and wait (120)).
I'm wondering if it is a connection issue or authorization rather than code. I sent some data and script to colleagues so they will try and we'll see if it is connection / authorization. I will let you know.
Thank you
Emmanuel
Re: Script publish in JMP Live 16 issueThis did not work for me either. The script failed to publish to JMP Live using Emmanuel's script. I received the following error message:

Re: Script publish in JMP Live 16 issueI am not 100% sure the error you are seeing. One suggestion to remove the API Key is correct. That is no longer needed. But you also need a Title in the Publish command in this case since there are multiple reports.
I changed the Publish command to this and was able to publish:
jmpliveresult = jmplive << Publish( webrpt, Title("Test"));
Here is the entire script I have (using sample data) that seems to work for me.
Names Default To Here( 1 );
bc = Open( "$SAMPLE_DATA/Big Class.jmp" );
gbline = bc << Run Script("Graph Builder Line and Bar Charts");
gblinechart = bc << Run Script("Graph Builder Line Chart");
gbheat = bc << Run Script("Graph Builder Heatmap");
// Save graphs as PowerPoint
gbline << Save Presentation( "$TEMP/graph1.pptx" );
gblinechart << Save Presentation( "$TEMP/graph2.pptx" );
gbheat << Save Presentation( "$TEMP/graph3.pptx" );
// Create the web report element to hold the graphs
webrpt = New Web Report();
webrpt << Add Reports( {gbline,gblinechart,gbheat}, Title( "Graph Builder" ) );
jmplive = New JMP Live( Connection( "Local Server" ),Prompt( If Needed ) );
jmpliveresult = jmplive << Publish( webrpt, Title("Test"));
Write("Publish(Successful): ", jmpliveresult << Succeeded);
Write("Publish(HTTP Status): ", jmpliveresult << Get HTTP Status);
Write("Publish(Response Type): ", jmpliveresult << Get Response Type);
Close All (data tables, nosave);
Let me know what you see.