Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
Brad
Level I

Adding new analysis output to a current display window

In my script below the second append to winSPCdata won’t add to the window while the script is running but then if I go back and just run that part it adds to the window.  Why is this happening?

 

 

winSPCdata = New Window("Post data", outline box( "Charts",
       )
);


ColListCD = dtStackedSPC2 << get column names;
ColListCal = dtAFMSplitData << get column names;


for(a=6, a<= 11, a++,
winSPCdata  << append (dtStackedSPC2 << Variability Chart(
                     Y( ColListCD[a] ),
                     X( :CreatedOnDateTimeUTC, :Lot ID, :Stamp ID, :Prints ),
                     Connect Cell Means( 1 ),
                     Std Dev Chart( 0 ),
                     Points Jittered( 1 ),
                     Show Box Plots( 1 ),
                     Mean Diamonds( 1 )
                     );
              );
       );
      

for(b=5, b<=9, b++,
winSPCdata  << append (dtAFMSplitData << Variability Chart(
                     Y( ColListCal[b] ),
                     X( :CreatedOnDateTimeUTC )              
                     );
              );
       );

 

 

3 REPLIES 3
Highlighted

Re: Adding new analysis output to a current display window

When you say "the second append" do you mean the second time through the first loop, or the entire second loop over variable b?  Is there anything displayed in the log?

 

I suspect that one of the Variability Charts failed to launch, terminating the script.  Perhaps one of the Y's is not numeric?

Highlighted
Brad
Level I

Re: Adding new analysis output to a current display window

Thanks for you comment, the first loop runs but the second loop that is making charts associtated with a different data tabe than the first loop is not running.  But then after the scritp is done I highlight just that second loop and run only that part and it works fine.  It will update the window with the correct analysis from that second table.  It seems that I can't add analysis to the window from different tables without the scritp stopping and then I run just that second loop.

 

Thanks
Brad

Highlighted

Re: Adding new analysis output to a current display window

Did you confirm that there are no error messages in the log?  Your first loop iterates over 6 columns - do all 6 reports appear in the window?  I'm not sure how you are confirming that the second loop "is not running".  It might help to add Print() statements or use the JSL debugger to see exactly where the script stops, if the log messages do not clarify this.

 

I modified your script to run with sample data (one Y each) and using multiple tables is not a problem in JMP 14:

 

winSPCdata = New Window("Charts", outline box( "Charts",
       )
);

dt1 = Open( "$SAMPLE_DATA/Variability Data/2 Factors Crossed.jmp" );
col1 = dt1 << get column names;

dt2 = Open( "$SAMPLE_DATA/Variability Data/MSALinearity.jmp" );
col2 = dt2 << get column names;


for(a=1, a<=1, a++,
winSPCdata  << append (dt1 << Variability Chart(
                     Y( col1[a] ),
                     X( :Operator, :part# ),
                     Connect Cell Means( 1 ),
                     Std Dev Chart( 0 ),
                     Points Jittered( 1 ),
                     Show Box Plots( 1 ),
                     Mean Diamonds( 1 )
                     );
              );
       );
      

for(b=1, b<=1, b++,
winSPCdata  << append (dt2 << Variability Chart(
                     Y( col2[b] ),
                     X( :Part )              
                     );
              );
       );
Article Labels

    There are no labels assigned to this post.