Calling functions that are part of an application add-inHow can I call functions that are created in an application add-in?
For example, having the add-in ID "my_addin", I expect something like this.
Script in the add-in.
foo = Function({x}, Return(x^2));
A script in a data table.
Try(
y = my_addin.foo(3);,
Throw("'my_addin' is not installed");
);
print(y); #9# 9
Data TableScriptingRe: Calling functions that are part of an application add-inSince you are the author of the Addin, I suggest that you pull the functions you want to be able to share, into a separate script, and save it as an independent script within the Addin. Then within the original script, you simply use an Include() to bring in the independent script.
For the non addin script, you will just use the method referenced by Ian, and get the directory the addin is save in, and then use an Include() to bring in the needed jsl that has the function in it.Re: Calling functions that are part of an application add-inYes. I am the author of the add-in as well.
Re: Calling functions that are part of an application add-inBuilding on @txnelson's thoughts, this thread may be useful.
Re: Calling functions that are part of an application add-inFunctions from installed Addins are not available in JSL until after the Addin has been run within the current JMP session, and then, one needs to know what NameSpace the Addin was run.
However, you may be able to restructure the original Addin to allow other JSL scripts to Include() it into the current script when needed.
Are you the author of the Addin where the function() you want to use is located?