- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Change Spec Limits dynamically and have plots update accordingly
Attached 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
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
- The Community Discussion Forum is not always going to provide you with a specific example of what you want. What you need to do, is to read the Scripting Guide located in the JMP Documentation Library. It will give you the details of the Scripting Environment, from which you will be able to create your own JSL without having to have a precise example provided to you.
- Attached is a small modification to your script that populates the spec limits boxes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
That 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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
Thank 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
I 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])
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
- The Community Discussion Forum is not always going to provide you with a specific example of what you want. What you need to do, is to read the Scripting Guide located in the JMP Documentation Library. It will give you the details of the Scripting Environment, from which you will be able to create your own JSL without having to have a precise example provided to you.
- Attached is a small modification to your script that populates the spec limits boxes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
Thank you Mr. Nelson, that snippet of code you provided allowed me to change the column property to the new limits as well as reverting back to the old ones if needed.
As for the Scripting Guide comment, I have it, the Scripting Index and the discussion boards open all the time when i code and sometimes is isn't very clear how to accomplish certain tasks. Trying to phrase what i want into something searchable doesn't always work which prompts me as a last resort only, to post a question here to the pro's like yourself.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Change Spec Limits dynamically and have plots update accordingly
I am glad to hear that you use the Scripting Guide and Scripting Index and Discussion Forum on such a regular basis. However, my suggestion that you read the Scripting Guide is not a suggestion to just have it around to look up items. I find that it is the backbone of learning JSL, and in fact isn't a very good reference manual. My suggestion is to literally read the manual from front to back. It will show you the real foundation of JSL. Once that documented is digested, then the Scripting Index becomes your daily reference tool.
So once again, congratulations on your using of the documentation and I hope that you can find the time to absorb the Scripting Guide.