cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
hans_deroos
Level II

Change preference in JMP script and restore preference as was before changed

I want to change the preferences via a script - Third part data(Excel open method( open all sheets)) and restore as it was before the change after my add-in - Thanks, Hans - JMP 17

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: Change preference in JMP script and restore preference as was before changed

rememberPrefs=getpreferences(); // capture all the prefs for restore later
show(getpreference(backgroundcolor)); // probably white. you could also do this to remember just one.
preference(backgroundcolor("orange")); // change something
show(getpreference(backgroundcolor)); // arghh! it is orange!
eval(rememberPrefs); // all better now
Craige

View solution in original post

4 REPLIES 4
statman
Super User

Re: Change preference in JMP script and restore preference as was before changed

Not sure what exactly you are looking for, but there was an Add-In that could save multiple preferences and switch between them.  Not sure whether it works with 17.

https://community.jmp.com/t5/JMP-Add-Ins/Preferences-Manager-with-import-export/ta-p/85117

"All models are wrong, some are useful" G.E.P. Box
hans_deroos
Level II

Re: Change preference in JMP script and restore preference as was before changed

Thanks statman - I downloaded the Preference Manager description.  Looks interesting.  Craigs getprefences() statement did solve my problem - Hans

Craige_Hales
Super User

Re: Change preference in JMP script and restore preference as was before changed

rememberPrefs=getpreferences(); // capture all the prefs for restore later
show(getpreference(backgroundcolor)); // probably white. you could also do this to remember just one.
preference(backgroundcolor("orange")); // change something
show(getpreference(backgroundcolor)); // arghh! it is orange!
eval(rememberPrefs); // all better now
Craige
hans_deroos
Level II

Re: Change preference in JMP script and restore preference as was before changed

Thanks Craig.  The startement 'getpreferences()' is the secret.  Hans