cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Conny_Wang
Level II

怎么单独使用变量替换列表里面的值并计算

lsl = 53;
target = 61;
usl = 69;

dataspec = Expr({ LSL( lsl ), USL( usl), Target( target ), Show Limits( 1 )});
dt:data << Set Property( "Spec Limits",Eval(dataspec ));

 

代码如上,但是始终不生效,规格线无法赋值,请求大家的帮助,感谢!

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: 怎么单独使用变量替换列表里面的值并计算

You will have to evaluate your values

Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Big Class.jmp");


lowlimit = 53;
targetvalue = 61;
highlimit = 69;

dataspec = EValExpr(
	{LSL(Expr(lowlimit)), USL(Expr(highlimit)), Target(Expr(targetvalue)), Show Limits(1)}
);

dt:weight << Set Property("Spec Limits", Eval(dataspec));

or you can do eval + evalexpr

Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Big Class.jmp");

lowlimit = 53;
targetvalue = 61;
highlimit = 69;

Eval(Eval Expr(
	Column(dt, "weight") << Set Property(
		"Spec Limits",
		{LSL(Expr(lowlimit)), USL(Expr(highlimit)), Target(Expr(targetvalue)),
		Show Limits(1)}
	)
));
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: 怎么单独使用变量替换列表里面的值并计算

You will have to evaluate your values

Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Big Class.jmp");


lowlimit = 53;
targetvalue = 61;
highlimit = 69;

dataspec = EValExpr(
	{LSL(Expr(lowlimit)), USL(Expr(highlimit)), Target(Expr(targetvalue)), Show Limits(1)}
);

dt:weight << Set Property("Spec Limits", Eval(dataspec));

or you can do eval + evalexpr

Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Big Class.jmp");

lowlimit = 53;
targetvalue = 61;
highlimit = 69;

Eval(Eval Expr(
	Column(dt, "weight") << Set Property(
		"Spec Limits",
		{LSL(Expr(lowlimit)), USL(Expr(highlimit)), Target(Expr(targetvalue)),
		Show Limits(1)}
	)
));
-Jarmo
Conny_Wang
Level II

Re: 怎么单独使用变量替换列表里面的值并计算

I have successfully solved this issue by following your method,thanks~

Recommended Articles