cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
ih
Super User (Alumni) ih
Super User (Alumni)

Custom functions available in every script session: including JMP Live update scripts

Is there a way to load a custom function into some namespace so it is available in every JMP script session or window?

 

I would like to call a fairly large and complex set of functions in update scripts for JMP Live reports instead of including all of that code in the script itself.  Typically (outside of JMP Live) I do this with an add-in, but since variables defined in the add-in load script do not always persist in JMP sessions I rely on reloading that add-in when necessary.  Since JMP Live does not allow access to local files from update scripts, this errors.  Thus, I am looking for a different way to make those custom/pre-defined functions available in the update scripts.

2 REPLIES 2
txnelson
Super User

Re: Custom functions available in every script session: including JMP Live update scripts

You can do this by using a Startup Script that runs when the JMP session starts up.

Run a Script at Start Up

You can run the same script every time you start JMP. For example, you might include the definitions of some utility functions or a namespace that you want available throughout your JMP session. You might also set some preferences in a startup script to keep preferences consistent. Preferences persist across JMP sessions, but you could explicitly reset some preferences in case they were changed at some point in the previous session. Name the script jmpStart.jsl and place it in one of the following folders, as appropriate for your operating system. When JMP starts, JMP looks for the jmpStart.jsl script in these folders in the order in which they are listed here. The first one that is found is run, and the search immediately stops. Note: Some path names in this section refer to the “JMP” folder. On Windows, in JMP Pro, the “JMP” folder is named “JMPPro”.

On Windows:

1. C:\Users\\AppData\Roaming\SAS\JMP\17

2. C:\Users\\AppData\Roaming\SAS\JMP

On macOS:

1. /Users//Library/Application Support/JMP/17

2. /Users//Library/Application Support/JMP

The jmpStart.jsl script runs only for a particular user on a computer. You can add a script named jmpStartAdmin.jsl in one of the following places, as appropriate for your operating system. This script is run for every user on a computer. JMP runs jmpStartAdmin.jsl first if found. Then JMP runs jmpStart.jsl if found.

On Windows:

1. C:\ProgramData\SAS\JMP\17

2. C:\ProgramData\SAS\JMP

On macOS:

1. /Library/Application Support/JMP/17

2. /Library/Application Support/JMP

Jim
ih
Super User (Alumni) ih
Super User (Alumni)

Re: Custom functions available in every script session: including JMP Live update scripts

Thanks @txnelson, by all rights this should be the answer but I cannot get it to work in JMP Live data refresh scripts.    It does in normal JMP Pro.  I am continuing to investigate and will update this thread once it is sorted out.