Change Spec Limits dynamically and have plots update accordinglyAttached you will find a sample data table and a sample script that I use that allows the user to change the column and have the plots update accordingly. I would like to add a additional display box that allows the user to change the Column Property Spec Limits and have the plots update. It would be something like Process Capability Analysis << Interactive Capability Plot but instead of a slide bar it would be a number edit col box for LSL, USL, Target.
I hope i explained what i am looking for well enough.
Thanks
GraphicsScriptingRe: Change Spec Limits dynamically and have plots update accordinglyYou should probably just add a second outline box below the RF Test outline box, with the number edit boxes for USL, Target and LSL. Since you are changing possibly 3 different values, I would probably add a button box that needs to be clicked on to update the chart.Re: Change Spec Limits dynamically and have plots update accordinglyThat was the plan however I would like the box update with the current "^ycols_Test^" and have then have the number edit boxes update with Spec Limits column property. Do i need to add the new boxes inside the "\[gb_expr_Test[^i^] or would i create a new one to hold the boxes?
Re: Change Spec Limits dynamically and have plots update accordinglyThat section is the JSL that produces the Distribution output. So that is not where to add the new boxes. The section I was referring to is the section that defines the Outline Box for the RF Test.Re: Change Spec Limits dynamically and have plots update accordinglyThank you! I have been searching these forums and I can't seem to find out a way to initially populate the any number edit box with the current spec limits listed in the column property.
If you run the new script attached you will see that the Text Edit Box "Test" auto populates with the current column selected for the distribution. When this happens i would like the script to be able to retrieve the current spec limits and populate the LSL, Target, USL (if applicable). I can then be able to put in new spec limits and then hit the button "Load New Spec Limits" and then the column property "Spec Limits" would update with the new numbers. I would also like to be able to store the old Spec Limits and then when finished, reassign them back to the column.
Re: Change Spec Limits dynamically and have plots update accordinglyI didn't look at all your code. But regarding 'I can't seem to find out a way to initially populate the any number edit box with the current spec limits listed in the column property.', this old code might help:
// ian.cox@jmp.com: 02Jun2005
NamesDefaultToHere(1);
// ******************************************************************************************
// Given a column reference, returns the spec limits in a vector, [lower, upper, target]:
// If a limit is not defined it is returned as .
// ******************************************************************************************
getSpecs = Function({col}, {Default Local},
// Note that the number of arguments in slp below can change! It can be 0 (if the
// property is not even defined) or 1, 2 or 3
slp = col << GetProperty("Spec Limits");
// Assume that nothing is defined . . .
l = .; u = .; t = .;
// Find out what is defined . . .
for(i=1, i<=NArg(slp), i++,
thisExpr = Arg(slp, i);
sType = Char(Head(thisExpr));
if (
sType == "LSL", l = Arg(thisExpr, 1),
sType == "USL", u = Arg(thisExpr, 1),
sType == "Target", t = Arg(thisExpr, 1)
)
);
Matrix({l, u, t})
);
dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
someSpecs = getSpecs(Column(dt, "NPN1"));
nw =
NewWindow("Edit Spec Limits",
lsBox = TextEditBox(someSpecs[1]),
usBox = TextEditBox(someSpecs[2]),
tarBox = TextEditBox(someSpecs[3])
);