I have a procedure or two that target full paths from the root of the hard drive on my Mac, which works fine when creating a path with "Macintosh HD:Users:tkessler:...etc"; however, in copying this to a new system, the hard drive is not necessarily called "Macintosh HD." This breaks the function of the procedure on that system. Is there a way to specify a full path from the root of the drive, without needing to enter the drive name? Alternatively, is there a way to look up the hard drive's name so I can assemble a full path string?
Thanks. That helps a bit, but I am running into another problem when trying to implement it. I've got some code here where I'm defining a static strconstant for a default path, but when I attempt to assemble the string and set it to be the strconstant's value, it throws an error that an equals symbol is expected. Here is the code:
A constant must be fully defined at compile time and thus can not use variables. I recommend instead that you create a function, e.g., DefaultDataPath(), that returns the appropriate string at runtime.
However I think it is better to have the end user create an Igor symbolic path to specify the folder of interest. For details execute:
DisplayHelpTopic "Symbolic Paths"
Or use SpecialDirPath to find the path to the user's Igor Pro User Files folder and use that. For details execute:
DisplayHelpTopic "Special Folders"
March 19, 2014 at 10:34 am - Permalink
string hd = ParseFilePath(0,tmppath,":",0,1)
Static StrConstant DefaultDataPath = hd+":Users:Shared:Previews"
March 19, 2014 at 10:59 am - Permalink
March 19, 2014 at 12:19 pm - Permalink
March 19, 2014 at 01:58 pm - Permalink