Hi,
Past user of jmp but new to scripting. I'm looking to make my life easier and automatically create control charts from a folder containing upto 55 csv files, save an image of the control chart using the name of the csv and record the LCL, AVG and UCL from each control chart in a separate data table (an added bonus would be to automatically calculate the cpk and ppk from the data) and save in a folder of my choice, then close all data tables and control charts all from the script.
Currently I have the following (as I said I'm new to scipting) but using the multiple file import script and a loop I can open each data table and create control charts, I'm just not sure how to achieve the rest of my request. Any help would be most appreciated.
Clear Log();
Multiple File Import(
<<Set Folder( "D:\Work\JMP script trials\" ),
<<Set Name Filter( "*.csv*;" ),
<<Set Name Enable( 0 ),
<<Set Size Filter( {4409, 4563} ),
<<Set Size Enable( 0 ),
<<Set Date Filter( {3632397829.702, 3632398887.037} ),
<<Set Date Enable( 0 ),
<<Set Add File Name Column( 0 ),
<<Set Add File Size Column( 0 ),
<<Set Add File Date Column( 0 ),
<<Set Import Mode( "CSVData" ),
<<Set Charset( "Best Guess" ),
<<Set Stack Mode( "Table Per File" ),
<<Set CSV Has Headers( 1 ),
<<Set CSV Allow Numeric( 1 ),
<<Set CSV First Header Line( 1 ),
<<Set CSV Number Of Header Lines( 1 ),
<<Set CSV First Data Line( 2 ),
<<Set CSV EOF Comma( 1 ),
<<Set CSV EOF Tab( 0 ),
<<Set CSV EOF Space( 0 ),
<<Set CSV EOF Spaces( 0 ),
<<Set CSV EOF Other( "" ),
<<Set CSV EOL CRLF( 1 ),
<<Set CSV EOL CR( 1 ),
<<Set CSV EOL LF( 1 ),
<<Set CSV EOL Semicolon( 0 ),
<<Set CSV EOL Other( "" ),
<<Set CSV Quote( "\!"" ),
<<Set CSV Escape( "" )
) << Import Data;
Names Default To Here( 1 );
dtList = {};
For( i = 1, i <= N Table(), i++,
dt = data table(i);
insert into(dtList, dt );
dtList[i] <<Control Chart Builder(
Show Capability( 1 ),
Variables( Y( :Value ) ),
Chart( Position( 1 ), Limits( Sigma( "Moving Range" ) ) ),
Chart( Position( 2 ), Limits( Sigma( "Moving Range" ) ) )
);
);