Subscribe Bookmark RSS Feed

Referencing JMP data sets contained within a JMP add-in

Hi - I want to create a JMP add-in which will need to access several JMP data sets that I intend to save within the add-in.  How do I reference those data sets within the script from which the add-in will be created - that is, what file paths do I assign to those data sets so that the script knows where to find them?

I suspect it'll involve either the $HOME or the $USER_APPDATA path names, maybe postfixed by the name I intend to give the add-in, and possibly using the Convert File Path() function.  Does anyone have a simple example of how to do this please?

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Use $ADDIN_HOME to get the addin's path.  For example suppose you have an addin called MYGREATAPP, and it is defined with an ID of "com.mycompany.mydept.mygreatapp".  You could open a dataset contained in the addin's directory with the following command:

open("$ADDIN_HOME(com.mycompany.mydept.mygreatapp)\mydataset.jmp");

2 REPLIES
Solution

Use $ADDIN_HOME to get the addin's path.  For example suppose you have an addin called MYGREATAPP, and it is defined with an ID of "com.mycompany.mydept.mygreatapp".  You could open a dataset contained in the addin's directory with the following command:

open("$ADDIN_HOME(com.mycompany.mydept.mygreatapp)\mydataset.jmp");

Perfect - that's exactly what I needed to know.  Many thanks!