Hi
I have a script that assigns spec limits (USL/LSL) to columns property, and then make a plot of the column, and I expect
to see the limits lines drawn on the plot. What happens is that the limits are set correctly in the table, but not visible on the plot.
If I draw the same plot to this column manually after running the script - no lines again.
If I open the column spec property window, I see the limits, the 'show reference line' is on.
only if I hit 'Apply' and then plot again - I can see the lines on the plot as expected. But I can't get it to work by script..
any idea?
(using JMP PRO 15)
This JSL should do the trick
// Your code
datacolnames = res_thk_specs:colname << get values;
specExpr = Expr(
Column( Res_Thk_Data, name ) <<
Set Property(
"Spec Limits",
{LSL( Expr( lower ) ), USL( Expr( upper ) ),
TARGET( Expr( target ) ), Show Limits( 1 )}
)
);
For( i = 1, i <= N Rows( RES_THK_SPECS ), i++,
name = Column( RES_THK_SPECS, "COLNAME" )[i];
lower = Column( RES_THK_SPECS, "LSL" )[i];
upper = Column( RES_THK_SPECS, "USL" )[i];
target = Column( RES_THK_SPECS, "TARGET" )[i];
_unit_ = Column( RES_THK_SPECS, "UOM" )[i];
If( Contains( datacolnames, name ),
Eval( Eval Expr( specExpr ) )
);
If( Contains( datacolnames, name ),
Column( Res_Thk_Data, name ) << Set Property( "Units", eval( _unit_ ) )
);
);
Jim, thanks that did the trick.