How does one get the revision of an Add-in through JSL? I would like to create an add-in and as part of the script check to see if the add-in needs to be updated. I envision I could have the add-in check an outside file containing the most current revision number and then check what the add-in revision that is currently running and note any discrepancy. My problem is that I don't know how to get the revision of an add-in via a script.
Thanks
I am not aware of a jsl function that will return the Addin version number, however the version number is stored in the Addin Definition file, and can be retrieved with the code below. What needs to be known is the Addin ID. Just change it to the actual Addin ID and the script will return the version number
Names Default To Here( 1 );
addinID = "com.fsl.OnewayANOVA"; // change this to the Addin ID you want the version from
jmpdef=load text file(
get Environment Variable( "APPDATA" ) ||
"\SAS\JMP\Addins\" ||
addinID ||
"\addin.def"
);
place = Contains( jmpdef, "addinVersion=" );
If( place > 0,
version = Word( 1, Substr( jmpdef, place + 13 ), "\!r" ),
version = 1
);
There may be a more direct way to get this. Maybe another Community Member will have one.
Works like a charm for me. Thanks a bunch