Variable name for maps folderCan JMP output the maps folder location for the current instance of JMP or, ideally, for all installed versions of JMP? I would like to copy maps into this folder using an add-in. Perhaps something like $Desktop or $Sample_Data?
Convert File Path( "$Sample_Data" )
Re: Variable name for maps folderMy observations:
- If inside the version number folder Maps are not loaded (.../Roaming/SAS/JMPPro/13/Maps does not work)
- If in the JMP folder, both JMPPro and JMPEA pick them up (.../Roaming/SAS/JMP/Maps loads for 13Pro and 14EA)
- If in the JMPPro or JMPEA folders, only that software finds the maps (.../Roaming/SAS/JMPPro/Maps loads for 13Pro but not 14EA)
Re: Variable name for maps folderSorry, accidentally left off part of the information from the doc:
Note: On Windows, in JMP Pro, the “JMP” folder is named “JMPPro”. In JMP Shrinkwrap, the “JMP” folder is named “JMPSW”.
I think this means that the Maps folder should be within the 'USER_APPDATA' folder, not just the 'JMP' folder, like where you would put add-ins. I am no expert on the map files though, maybe someone else can chime in on the accuracy of this.
Re: Variable name for maps folderThanks for the reference, I missed that one. The path variable $USER_APPDATA includes JMP, JMPPro, or JMPEA and the version number, and I do not see one in the scripting guide that takes you straight to the JMP folder. On windows this seems to work though:
Regex( Convert File Path( "$USER_APPDATA" ), "^(.*/)[^/]+/[^/]+/$", "\1") || "JMP/Maps/"
Thanks again!
Edited to include start and end anchors in the regex match string.
Re: Variable name for maps folder From Example of Creating a Map in Graph Builder:
JMP looks for these files in two locations. One location is shared by all users on a machine. This location is:
|
•
|
Windows: C:\Program Files\SAS\JMP\\Maps
|
|
•
|
Mac: /Library/Application Support/JMP//Maps
|
The other location is specific for an individual user:
|
•
|
On Windows: C:\Users\\AppData\Roaming\SAS\JMP\Maps
|
|
•
|
On Mac: / Users//Library/Application Support/JMP/Maps
|
You can't change these locations, but you might have better luck writing to the users AppData/Application Support folder since you may not have permissions for the other folder.
You can use the 'USER_APPDATA' path variable as a starting point and add '/Maps' to point to this directory (works on both Mac and Windows).
Set Path Variable( "USER_MAP_HOME", Convert File Path( "$USER_APPDATA/Maps" ) );
Re: Variable name for maps folderThanks Justin,
There is no way for someone to change this folder, is there? I guess that was my biggest concern but maybe that is a moot point.
Re: Variable name for maps folderYou can use the '$JMP_HOME' directory as a starting point and add '/Maps' to point to the Maps directory.
Convert File Path( "$JMP_HOME/Maps" );
EDIT: The above code gives you the right path on Windows, but not on Mac. Below is a script that sets a "MAP_HOME" path variable, based on the current operating system.
Set Path Variable(
"MAP_HOME",
If( Host is( "Windows" ),
Convert File Path( "$JMP_HOME\Maps", "Windows" ),
Convert File Path( "$ALL_HOME\Maps" )
)
);