Ho un ottimo script che ho preso in prestito da qualche parte per importare più limiti di specifiche e assegnarli a ciascuna colonna. C'è un modo quando si modificano le specifiche di una colonna per selezionare anche la casella sotto Limiti delle specifiche per "Mostra come linee di riferimento del grafico"? In questo momento devo farlo manualmente.

dt = Current Data Table();
dt2 = Open();
Current Data Table( dt );
nw = New Window( "Select Process Variables",
Text Box( "Selection Columns" ),
H List Box(
datacolbox = Col List Box( all ),
Button Box( "Process Variables",
pList << append( datacolbox << get selected )
),
pList = List Box( {} )
),
Button Box( "OK",
thelist = plist << get items;
pvars = ":" || thelist[1];
For( i = 2, i <= N Items( thelist ), i++,
pvars = pvars || ",:" || thelist[i]
);
Eval(
Parse(
"obj = dt << Process Capability(
Process Variables(" || pvars ||
" ),
Spec Limits( Import Spec Limits( dt2 ) )
);"
)
);
obj << Save Spec Limits as Column Properties;
obj << close window;
nw << close window;
)
);Grazie!
Se sto interpretando correttamente il tuo codice, quello che stai facendo è copiare i tuoi limiti dalla tabella dei limiti, nelle proprietà della colonna per la tua tabella di dati.In questo caso, potresti voler esaminare la funzionalità Manage Spec Limits in JMP 14
Manage Spec Limits( );
Tuttavia, se vuoi semplicemente continuare nel modo in cui lo stai facendo, ecco una modifica del tuo script che imposterà i limiti di visualizzazione
Names Default To Here( 1 );
dt = open();
dt2 = Data Table( "limits" );
Current Data Table( dt );
nw = New Window( "Select Process Variables",
Text Box( "Selection Columns" ),
H List Box(
datacolbox = Col List Box( all ),
Button Box( "Process Variables", pList << append( datacolbox << get selected ) ),
pList = List Box( {} )
),
Button Box( "OK",
thelist = plist << get items;
// Loop across all of the item is theList and process
// the data
For( i = 1, i <= N Items( theList ), i++,
theRow = dt2 << get rows where( :Process == theList[i] );
If( N Rows( theRow ) > 0,
// Change theRow to a scaler
theRow = theRow[1];
// Set the spec limits in the dt data table by reading
// the values from the dt2(limits) data table
Eval(
Substitute(
Expr(
Column( dt, theList[i] ) <<
set property(
"spec limits",
{__LSL__, __USL__, __Target__, Show Limits( 1 )}
)
),
Expr( __LSL__ ), Column( dt2, "LSL" )[theRow],
Expr( __USL__ ), Column( dt2, "USL" )[theRow],
Expr( __Target__ ), Column( dt2, "Target" )[theRow]
)
);
);
);
nw << close window;
)
);