Subscribe Bookmark RSS Feed

Combine multiple journals into one journal

senatorx

Community Trekker

Joined:

Jun 12, 2012

iHi, I'd like to do something similar to below. I'm running JMP9.

Trend_rpt = trend_biv1 << Report; //trend_biv1 is a bivariate object.

Trend_rpt << Save Journal(SavePath || "journal1.jrn");

Trend_rpt = trend_biv2 << Report; //trend_biv2 is a second bivariate object.

Trend_rpt << Save Journal(SavePath || "journal2.jrn");

//Later in script, after the report and bivariate objects no longer exist:

ob1_jrn = Open(SavePath || "journal1.jrn");

ob2_jrn = Open(SavePath || "journal2.jrn");

ob1_jrn << Append(ob2_jrn); //doesn't work.

ob1_jrn << Save Journal(SavePath || "combinedJournal.jrn");

I would like some method to combine journal output into a single journal.

Alternatively, I would like a way to open multiple .PNG files and add them to a single journal.  As far as I can tell, there is no way to add an image file to a journal.  Any thoughts?  Thanks!

2 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Only display boxes can be appended. An index (or name) can be used to address a display box within the journal object.

This should work:

ob1_jrn <<  append(ob2_jrn[1]);


Or alternatively, to get more layout options the content of both journals can be combined in a new window, e.g.:

nw = new window( "Biv1&2", hlistbox( ob1_jrn[1], ob2_jrn[1] ) );

nw << Save Journal(SavePath || "combinedJournal.jrn");


gzm

Community Trekker

Joined:

Jun 23, 2011

//The code below uses Journal Box() and Picture Box() to create a custom display of saved journals and pictures.

//Note you can use a statement like jrn_src = trend_cc1 << get journal, even when trend_cc1 is invisible

//before saving them.

 

SavePath = "c:\temp\";

dt = open("$sample_data\semiconductor capability.jmp");

dt:lot_id << Set Property(

                "Value Ordering",

                {"lot1", "lot2", "lot3", "lot4", "lot5", "lot6", "lot7", "lot8", "lot9",

                "lot10", "lot11", "lot12", "lot13"}

           );

dt << Color by Column(:lot_id);

// create trend charts

trend_cc1 = Control Chart(

     Phase( :lot_id ),

     KSigma( 3 ),

     Show Limits Legend( 0 ),

     Chart Col(

           :NPN1,

           Levey Jennings(

                Test 1( 1 )

           )

     ),

     SendToReport(

           Dispatch(

                {"Levey Jennings of NPN1"},

                "1",

                ScaleBox,

                {Format( "Best", 10 ), Min( 0.5 ), Max( 1456 ), Inc( 100 ),

                Minor Ticks( 0 )}

           ),

           Dispatch(

                {"Levey Jennings of NPN1"},

                "Levey Jennings Chart",

                FrameBox,

                {Frame Size( 546, 182 )}

           )

     )

);

trend_cc2 = Control Chart(

     Phase( :lot_id ),

     KSigma( 3 ),

     Show Limits Legend( 0 ),

     Chart Col(

           :PNP1,

           Levey Jennings(

                Test 1( 1 )

           )

     ),

     SendToReport(

           Dispatch(

                {"Levey Jennings of PNP1"},

                "1",

                ScaleBox,

                {Format( "Best", 10 ), Min( 0.5 ), Max( 1456 ), Inc( 100 ),

                Minor Ticks( 0 )}

           ),

           Dispatch(

                {"Levey Jennings of PNP1"},

                "Levey Jennings Chart",

                FrameBox,

                {Frame Size( 546, 182 )}

           )

     )

);

Trend_rpt = trend_cc1 << Report; //trend_cc1 is a control chart object.

Trend_rpt << Save Journal(SavePath || "journal1.jrn");

trend_cc1<< Close Window;

Trend_rpt = trend_cc2 << Report; //trend_cc2 is a second control chart object.

Trend_rpt << Save Journal(SavePath || "journal2.jrn");

trend_cc2 << Close Window;

//Later in script, after the report and bivariate (or control chart) objects no longer exist:

//JMP Example from Functions >> Display >> Picture Box()

pict = If( Host is( Windows ),

     Open(

           "$JMP_HOME/Support Files English/Tip of the Day/images/tip8-1.gif",

           png

     )

);

// you can read the JRN file as text or as a journal

//If you read as a journal file you will also have 2 journal

//windows open, you can open them invisible

ob1_jrn_txt = Load Text File (SavePath || "journal1.jrn", Invisible);

ob2_jrn_txt = Load Text File(SavePath || "journal2.jrn", Invisible);

nw = New Window( "Example",

ob = OutlineBox("lay 'em out & stack 'em up",

  HListBox(

     Picture Box( pict ),

     VlistBox(Journal Box(ob1_jrn_txt), JournalBox(ob2_jrn_txt)

))));

ob1_jrn = Open (SavePath || "journal1.jrn");

ob2_jrn = Open(SavePath || "journal2.jrn");

ob1_jrn_src = ob1_jrn << get journal;

ob2_jrn_src = ob2_jrn << get journal;

//now close journal window objects

ob1_jrn << close window;

ob2_jrn << close window;

ob << append( HlistBox(Journal Box(ob1_jrn_src), JournalBox(ob2_jrn_src)

));