cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to attend Discovery Summit 2025 Online: Early Users Edition, Sept. 24-25.
  • New JMP features coming to desktops everywhere this September. Sign up to learn more at jmp.com/launch.
Choose Language Hide Translation Bar
princeshiva
Level II

Sample size explorer : How to access programmatically

I would like to access and edit different components/fields(text fields) of sample size explorer programmatically. I want to build a custom script where my user interface(much simple with some default values) will ask user similar numbers/options to enter. that user interface should connect to sample size explorer platform and return me outputs. How can I do that. below are highlighted components I want access to edit

princeshiva_0-1738883270206.png

 

4 REPLIES 4
jthi
Super User

Re: Sample size explorer : How to access programmatically

You might be able to find the scripts from your JMP installation location and inside folder \Resources\Builtins 

-Jarmo
jthi
Super User

Re: Sample size explorer : How to access programmatically

And if you just wish to modify those values, find the reference to the window and then references to those number edit boxes. To get the access to the window, you can use Window("windowname") or maybe try to access the window directly using reference you might find from the builtin jsl. Then use Show Properties to explore which display elements you wish to access

jthi_0-1738906888937.png

Or if the builtin jsl exposes references to these you could utilize those.

-Jarmo
jthi
Super User

Re: Sample size explorer : How to access programmatically

Without knowing how you are going to be building your script, this example gives some suggestions on how to access the values (there might be better ways which you can find potentially find from the builtin scripts)

Names Default To Here(1);

path = "$BUILTIN_SCRIPTS/Power_Two_Independent_Sample_Means.jsl";

Include(path);

show(win << Get Window Title); // take a look at Power_Two_Independent_Sample_Means.jsl and you see this reference is there

// Using indexing from Show Properties
// Window("Power Explorer for Two Independent Sample Means")["Power Explorer for Two Independent Sample Means","Explorer Settings",NumberEditBox(1)]
aneb1 = win[Outline Box("Explorer Settings"), NumberEditBox(1)];

// Using references
// _alphanb gets lost somewhere, so access through alphatb
alpha_neb2 = (alphatb << sib);

// Using XPath
alpha_neb = win << XPath("//TextBox[text() ='Alpha']/following-sibling::NumberEditBox");
alpha_neb3 = alpha_neb[1]; // XPath returns a list

// Setting the values
alpha_neb2 << Set(0.10, run script(1)); // You most likely want to include Run Script(1) to most value changes to avoid messing anything up

 

-Jarmo
princeshiva
Level II

Re: Sample size explorer : How to access programmatically

Thanks!

All solutions look great and provide a lot of flexibility. I'll try out provided solutions and provide feedback if any.

Recommended Articles