我有一个很棒的脚本,我从某个地方借来导入多个规范限制并将它们分配给每一列。有没有办法在编辑列的规范时也检查“显示为图形参考线”的规格限制下的框?现在我必须手动完成此操作。

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;
)
);