Script to automatically save all data tables and reports in a JMP project to the contentsI currently have the below static script that saves specific reports and tables to the project contents by name. I'd like to generalize this to a script that will do this for any project, so names would have to be dynamically generated and passed through a save function. I've played around a bit and haven't gotten close yet - help is appreciated
This is the script that currently works on fixed table names. It is run in a workflow embedded in the same project as all the tables and reports. For reports I would always want the embed to be set to 0:
proj = Current Data Table() << Get Project();
proj << Run Script(
Data Table("plate_data_long") << Save As("$PROJECT/plate_data_long.jmp");
Data Table("plate_data_wide") << Save As("$PROJECT/plate_data_wide.jmp");
Data Table("Summarized by PC Plate_well and Process") << Save As("$PROJECT/Summarized by PC Plate_well and Process.jmp");
Window ("Assay Plate Value Heatmap") << Save Window Report( "$PROJECT/Assay Plate Value Heatmap.jrp", embed data( 0 ) );
Window ("Controls and Parent QC") << Save Window Report( "$PROJECT/Controls and Parent QC.jrp", embed data( 0 ) );
Window ("Assay Plate Value Heatmap") << Save Window Report( "$PROJECT/Assay Plate Value Heatmap.jrp", embed data( 0 ) )
;
);Automation and ScriptingRe: Script to automatically save all data tables and reports in a JMP project to the contentsYou can get list of data table names by using Get Data Table List
tablenames = Get Data Table List() << get name;
Report windows with Get Window List
reportwindows = Get Window List(Type("Reports"));
You can then loop over them using For Each.
Check both of those from Scripting Index as they support Project argument which you might have to use.
Edit: fixed command or report windows
Re: Script to automatically save all data tables and reports in a JMP project to the contentsThanks Jarmo - any clue why the second function isn't actually returning the report I have in the project? The first function works as expected for the data tables.
Snapshot of project windows:

Log showing that the below doesn't return the report
reportwindows = Get Window List(Type("Reports"));

Adding a second report shows that the displaybox/headbox doesn't differentiate between multiple reports:

Re: Script to automatically save all data tables and reports in a JMP project to the contentsThose are the report windows.
Re: Script to automatically save all data tables and reports in a JMP project to the contentsAnd, for clarity, it does differentiate between them. You can send the <