Hi -
Is there a way to open closed Journal file and append to it?
Thank you
Appreciate your help, Ih!
I modified your script a bit to get the following working in Jmp 12.2 to append in closed journal.
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); //Save the first journal with a tab box already in it j1 = New Window( "Journal_1", <<journal, tbox = Tab Box() ); tbox << Append ("1", vlb = Panel Box()); vlb << Append( dt << bivariate( x( :weight ), y( :height ) ) ); j1 << save journal( "$TEMP\Existing.jrn" ); j1 << close window(); //Open closed journal nw_existing = Open( "$TEMP\Existing.jrn" ); tb = (nw_existing << XPath("//TabListBox"))[1]; tb << Append("2",vlb2 = Panel Box()); vlb2<< Append( dt << oneway( x( :sex ), y( :height ) ) );
Here is the method that I used to solve this issue in your previous discussion entry
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); j1 = New Window( "Journal_1", <<journal, dt << bivariate( x( :weight ), y( :height ) ) ); Current Journal() << save journal( "$TEMP\Existing.jrn" ); Current Journal() << close window(); //Open closed journal nw_existing = Open( "$TEMP\Existing.jrn" ); //Create New journal nw2 = New Window( "Journal_2", <<journal, dt << oneway( x( :sex ), y( :height ) ) ); Current Journal() << save journal( "$TEMP\New.jrn" ); //create new window nw = New Window( "Final",<<journal ); //add older jrn first, followed by recent one nw << append( nw_existing ); //nw << append( Report(nw_existing)); // does not make any difference nw << append( nw2 );
I took this a step further to append each jrn file as a tab in a consolidated journal file.
Shown below is modified code that works in Jmp 14.3.0 but not in Jmp 12.2.0.
Names Default To Here( 1 ); dt = Open( "$SAMPLE_DATA/Big Class.jmp" ); j1 = New Window( "Journal_1", <<journal, dt << bivariate( x( :weight ), y( :height ) ) ); Current Journal() << save journal( "$TEMP\Existing.jrn" ); Current Journal() << close window(); //Open closed journal nw_existing = Open( "$TEMP\Existing.jrn" ); //Create New journal nw2 = New Window( "Journal_2", <<journal, dt << oneway( x( :sex ), y( :height ) ) ); Current Journal() << save journal( "$TEMP\New.jrn" ); //create new window nw = New Window( "Final", tbox = Tab Box() ); //add New jrn first, followed by Existing tbox << Append ("New", vlb = Panel Box()); vlb << Append( nw2 ); tbox << Append ("Existing", vlb = Panel Box()); vlb << Append( nw_existing );
Output from Jmp 12.2.0 included below. New tab is populated but Existing tab does not have the plot.
I am limited to usage of Jmp 12.2.0 so would like to figure out a way to get this working. Appreciate help and pointers.
Thanks!
Hello @uProf,
If you step through your code, running one line at a time, in 12.2, what line does not do what you expect it to? For example does the the existing journal open and contain everything you expect it to? Doing that bit of troubleshooting will lead you to a more specific question and get you to a solution faster.