I keep getting an error when trying to save a project file that says:
Project has unsaved documents. All files in a project must be saved or closed before the project can be saved. at row 1629.
One of my tables has 1629 rows, but it is already saved in the script a few lines above. I even tried manually saving each file again, then tried running the JSL to save the project, and I get the same error again. The only files currently open in the project are the two data tables (dt and dt2), and the script I am running this from. Both "filepath" and "PrjTitle" are variables that get assigned based on user input from modal windows earlier in the script.
dt << Save As( "$PROJECT/"||char(dt<<GetName)||".jmp" );
dt2 << Save As( "$PROJECT/"||char(dt2<<GetName)||".jmp" );
Wait(0.5);
Project << Save as( filepath||PrjTitle||".jmpprj" );
I also tried Save instead of Save As, but got the same result.
dt << Save As( "$PROJECT/"||char(dt<<GetName)||".jmp" );
dt2 << Save As( "$PROJECT/"||char(dt2<<GetName)||".jmp" );
Wait(0.5);
Project << Save( filepath||PrjTitle||".jmpprj" );
My only theory right now is that it has something to do with me trying to save the files to the project itself, but I don't see anything on the forums, scripting guide, scripting index, etc that says anything about that being something that cannot be done. The only things I could find were statements that you cannot save a project using JSL if there are unsaved files in the project, like this one here near the bottom of the page:
Note: If you're saving a project with unsaved documents in JSL, the project doesn't close and you get a log message that the project has unsaved documents. All files in a project must be saved or closed before the project can be saved. However, if you interactively save a project with unsaved documents, you are prompted to save the documents.
Source: https://www.jmp.com/support/help/en/17.1/index.shtml#page/jmp/create-a-project-with-a-bookmarks-pane...
Currently using JMP 16.2.0, in Windows 10.