複数のスペック制限をインポートして各列に割り当てるために、どこかから借用した素晴らしいスクリプトがあります。[グラフの基準線として表示]の[仕様の制限]の下にあるチェックボックスをオンにして列の仕様を編集する方法はありますか。今私はこれを手動でしなければなりません。

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機能を確認してください。
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;
)
);