cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-219949%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ECombina%203%20diari%20in%201%20diario%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219949%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECIAO%2C%3C%2FP%3E%3CP%3EVorrei%20combinare%203%20file%20di%20diari%20in%201%20e%20salvare%20il%20diario%20finale%20in%20formato%20PDF.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDiario_1%20%3D%20Diario%3AG_Si_Wafer_Table%3C%2FP%3E%3CP%3EDiario_2%20%3D%20Diario%3AG_Si_Wafer_Mapping%3C%2FP%3E%3CP%3EDiario_3%20%3D%20Diario%3AG_Si_Wafer_Reject_Pareto%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECome%20combinare%203%20diari%20in%201%2C%20come%20salvare%20come%20PDF%20e%20come%20chiudere%20tutti%20e%203%20i%20diari%20dopo%20aver%20salvato%20un%20PDF.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219975%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combina%203%20diari%20in%201%20diario%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219975%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EEcco%20uno%20script%20annotato%20che%20dovrebbe%20aiutarti%20a%20comprendere%20il%20problema%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0A%0A%2F%2F%20Open%20sample%20data%0Adt%20%3D%20Open(%20%22%24SAMPLE_DATA%2Fbig%20class.jmp%22%20)%3B%0A%0A%2F%2F%20Create%202%20journal%20windows%2C%20naming%20them%20what%20appears%20to%20be%20%22Journal_1%22%0A%2F%2F%20and%20%22Journal_2%22%0A%2F%2F%20Also%20assign%20the%20JSL%20variables%20j1%20and%20j2%20to%20the%20journals%0Aj1%20%3D%20New%20Window(%20%22Journal_1%22%2C%20%26lt%3B%3CJOURNAL%3E%3C%2FJOURNAL%3E%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219974%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combina%203%20diari%20in%201%20diario%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219974%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHo%203%20riviste%20individuali%20e%20sono%20denominate%20rispettivamente%20Journal_1%2C%20Journal_2%20e%20Journal_3.%20Ogni%20diario%20ha%20un%20grafico%20a%20barre%2C%20un%20grafico%20a%20torta%2C%20ecc.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219973%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combina%203%20diari%20in%201%20diario%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219973%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECi%20sono%20virgolette%20intorno%20a%20%22journal_1%22.Nel%20mio%20script%2C%20presumo%20che%20Journal_1%20fosse%20una%20variabile%20JSL%20che%20puntava%20al%20journal.Non%20%C3%A8%20cos%C3%AC%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219972%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combina%203%20diari%20in%201%20diario%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219972%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3ECIAO%2C%3C%2FP%3E%3CP%3ENon%20so%20perch%C3%A9%20tutti%20e%203%20i%20diari%20non%20vengano%20ancora%20aggiunti%20al%20diario%20finale.%20Questo%20%C3%A8%20l'errore%20dal%20log.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ENon%20viene%20visualizzato%20nell'accesso%20o%20nella%20valutazione%20di%20'append'%20%2C%20append(%20%22Journal_1%22%20)%20%2F*%23%23%23*%2F%3C%2FP%3E%3CP%3ENello%20script%20seguente%2C%20errore%20contrassegnato%20da%20%2F*%23%23%23*%2F%3CBR%20%2F%3E%20nw%20%3D%20Nuova%20finestra(%20%22finale%22%2C%20%26lt%3B%3CJOURNAL%3E%3C%2FJOURNAL%3E%20nw%20%26lt%3B%26lt%3B%20append(%20%22Journal_1%22%20)%20%2F*%23%23%23*%2F%3B%3CBR%20%2F%3E%20ora%20%26lt%3B%3CAPPEND%3E%3C%2FAPPEND%3E%20ora%20%26lt%3B%3CAPPEND%3E%3C%2FAPPEND%3E%20nw%20%26lt%3B%26lt%3B%20Salva%20PDF(%20%22%24TEMP%2Fesempio.pdf%22%20)%3B%3CBR%20%2F%3E%20Apri(%20%22%24TEMP%2Fesempio.pdf%22%20)%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-219959%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Combina%203%20diari%20in%201%20diario%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-219959%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EPer%20realizzare%20ci%C3%B2%20che%20stai%20cercando%2C%20%C3%A8%20semplicemente%20Append()%20i%20diari%20insieme.L'esempio%20seguente%20crea%20una%20nuova%20finestra%20del%20diario%2C%20aggiunge%20insieme%20i%203%20diari%20e%20quindi%20la%20salva%20come%20PDF.%3C%2FP%3E%0A%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3E%3CFONT%20style%3D%22background-color%3A%20%23ffffff%3B%22%3Enw%3Dnew%20window(%22final%22%2C%26lt%3B%3CJOURNAL%3E%3C%2FJOURNAL%3E%3CBR%20%2F%3E%3C%2FFONT%3Enw%26lt%3B%3CAPPEND%3E%3C%2FAPPEND%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3ELa%20documentazione%20sull'utilizzo%20delle%20riviste%20%C3%A8%20trattata%20nella%20Guida%20allo%20scripting%3C%2FP%3E%0A%3CP%3EAiuto%3D%3D%26gt%3BLibri%3D%3D%26gt%3BGuida%20allo%20scripting%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
bsl
bsl
Level II

Combine 3 journals into 1 journal

Hi,

I would like to combine 3 journals file into 1, and save the final journal in PDF format.

 

Journal_1 = Journal:G_Si_Wafer_Table

Journal_2 = Journal:G_Si_Wafer_Mapping

Journal_3 = Journal:G_Si_Wafer_Reject_Pareto

 

How to combine 3 Journals into 1, how to save as PDF, and how to close all 3 journals after save a PDF.

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Combine 3 journals into 1 journal

Here is an annotated script that should help you understand the issue

Names Default To Here( 1 );

// Open sample data
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Create 2 journal windows, naming them what appears to be "Journal_1"
// and "Journal_2"
// Also assign the JSL variables j1 and j2 to the journals
j1 = New Window( "Journal_1", <<journal, dt << bivariate( x( :weight ), y( :height ) ) );

j2 = New Window( "Journal_2", <<journal, dt << oneway( x( :sex ), y( :weight ) ) );

// Create an empty journal window to move the other journals into
jFinal = New Window( "Final", <<journal );

// There are 2 methods below that can be used to append the journals to the 
// final journal
// ^Journal pointer final^ << append( ^Journal pointer Journal_1^);
// jFinal << append( j1 );
// or
// window("final journal window name") << append( window("journal 1 window name"));
// window("Journal: Final") << append( window( "Journal: Journal_1"))

jFinal << append( j1 );

Window( "Journal: Final" ) << append( Window( "Journal: Journal_2" ) );

// The real name of the journal window is the key.  Even though the code gives the name of
// the journal windows as "Journal_1", "Journal_2" and "Final", that is not the actual name.
// "Journal: Journal_1" etc. is the name.  However, if one explictly assigns a name to
// journal, such as
//  j1 << set window title( "Journal_1" );
// the window's name will be "Journal_1"

jFinal2 = New Window( "Final 2" );
jFinal2 << set window title( "Final 2" );
j1 << set window title( "Journal_1" );
j2 << set window title( "Journal_2" );

Window( "Final 2" ) << append( Window( "Journal_1" ) );
Window( "Final 2" ) << append( Window( "Journal_2" ) );
Jim

View solution in original post

5 REPLIES 5
txnelson
Super User

Re: Combine 3 journals into 1 journal

To accomplish what you are looking for, is to simply Append() the journals together.  The example below creates a new journal window, appends the 3 journals together, and then saves it as a PDF.

nw=new window("final",<<journal);

nw<<append(Journal_1); nw<<append(Journal_2); nw<<append(Journal_3); nw << Save PDF( "$TEMP/example.pdf" ); open("$TEMP/example.pdf");

Documentation on working with journals is covered in the Scripting Guide

     Help==>Books==>Scripting Guide

Jim
bsl
bsl
Level II

Re: Combine 3 journals into 1 journal

Hi,

I don't know why the all 3 journals still does not append to the final journal. This is the error from log.

 


Not a display in access or evaluation of 'append' , append( "Journal_1" ) /*###*/

In the following script, error marked by /*###*/
nw = New Window( "final", <<journal );
nw << append( "Journal_1" ) /*###*/;
nw << append( "Journal_2" );
nw << append( "Journal_3" );
nw << Save PDF( "$TEMP/example.pdf" );
Open( "$TEMP/example.pdf" );

txnelson
Super User

Re: Combine 3 journals into 1 journal

You have quotes around "journal_1".  In my script, I am assuming that Journal_1 was a JSL variable pointing to the journal.  Is this not the case?

Jim
bsl
bsl
Level II

Re: Combine 3 journals into 1 journal

I have 3 individual journals and named as Journal_1, Journal_2, & Journal_3 respectively. Each journal has Bar chart, pie char...etc.

txnelson
Super User

Re: Combine 3 journals into 1 journal

Here is an annotated script that should help you understand the issue

Names Default To Here( 1 );

// Open sample data
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Create 2 journal windows, naming them what appears to be "Journal_1"
// and "Journal_2"
// Also assign the JSL variables j1 and j2 to the journals
j1 = New Window( "Journal_1", <<journal, dt << bivariate( x( :weight ), y( :height ) ) );

j2 = New Window( "Journal_2", <<journal, dt << oneway( x( :sex ), y( :weight ) ) );

// Create an empty journal window to move the other journals into
jFinal = New Window( "Final", <<journal );

// There are 2 methods below that can be used to append the journals to the 
// final journal
// ^Journal pointer final^ << append( ^Journal pointer Journal_1^);
// jFinal << append( j1 );
// or
// window("final journal window name") << append( window("journal 1 window name"));
// window("Journal: Final") << append( window( "Journal: Journal_1"))

jFinal << append( j1 );

Window( "Journal: Final" ) << append( Window( "Journal: Journal_2" ) );

// The real name of the journal window is the key.  Even though the code gives the name of
// the journal windows as "Journal_1", "Journal_2" and "Final", that is not the actual name.
// "Journal: Journal_1" etc. is the name.  However, if one explictly assigns a name to
// journal, such as
//  j1 << set window title( "Journal_1" );
// the window's name will be "Journal_1"

jFinal2 = New Window( "Final 2" );
jFinal2 << set window title( "Final 2" );
j1 << set window title( "Journal_1" );
j2 << set window title( "Journal_2" );

Window( "Final 2" ) << append( Window( "Journal_1" ) );
Window( "Final 2" ) << append( Window( "Journal_2" ) );
Jim

Recommended Articles