我從某處借來了一個很棒的腳本來導入多個規格限制並將它們分配給每一列。 有沒有辦法在編輯列的規格時同時選取規格限制下的「顯示為圖形參考線」方塊? 現在我必須手動執行此操作。

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;
)
);謝謝!
如果我正確解釋您的程式碼,那麼您所做的是將限制從限製表複製到資料表的列屬性中。如果是這種情況,您可能需要查看 JMP 14 中的管理規格限值功能
Manage Spec Limits( );
但是,如果您只想繼續目前的方式,請對腳本進行修改,以設定顯示限制
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;
)
);