Access to values in File Preferences

Feb 3, 2012 at 11:49am

Access to values in File Preferences

When one adds a new entry to the File Preferences list, you give a name and a path.

Is there a way to retrieve a specific path programatically, given the name?

#61595
Feb 3, 2012 at 5:17pm

not sure what you mean, [absolutepath] gives you the path of a file in searchpath.
O.

#222334
Feb 3, 2012 at 5:24pm

If you click on File Preferences, you can add new folders to the search path. Those folders are given names. I would like to be able to use a name to find the appropriate search path.

However, I just read the documentation on File Preferences and it says

“You can give the entry you add to the search path a name in the Name column. However, this name has no functional importance and is only for your future reference.”

so I am SOL (sigh)

I’ll have to see if I can figure out how to get the value of an environment variable instead.

#222335
Feb 3, 2012 at 6:07pm

didn’t notice there’s a name column. the env variables you’ll only get via external AFAIK. O.

#222336
Feb 4, 2012 at 1:07am

I have solved this problem by putting a Max object that returns the path where it is located into each folder on my search path. The name of the object is the same as that defined in the File Preferences (just for convenience).

#222337
Feb 4, 2012 at 1:18am

The File Prefs should be stored in a file somewhere, though I just looked and couldn’t find it. If so, you might be able to load it into [text] and parse it somehow.

#222338
Feb 4, 2012 at 1:37am

Not a bad idea. However, it would be nice if Cycling74 would add an object to a future update that can retrieve the path given the name.

#222339

You must be logged in to reply to this topic.