Is there no way to specify the “default Relink folder” option via scripting?
In the UI you can set it via Preferences > File Handling > Default Relink Folder.
You can eg set some of the adjacent options eg doing a app.linkingPreferences.checkLinksAtOpen = false
You’re correct that setting the “Default Relink Folder” via scripting isn’t directly exposed in the InDesign scripting API. However, if you’re working on managing links programmatically, you might find the approach I’ve taken with a CEP extension called “Tree Shade” useful.
“Tree Shade” is a CEP extension I’ve developed that significantly enhances link management in InDesign, particularly when dealing with relinking and asset tracking across multiple projects. Here are some of the key features that might be relevant to your needs:
Auto Tracing and Relinking: Tree Shade automatically traces and relinks files when they are renamed or moved, ensuring that no links are broken without the need for manual intervention. This could be a powerful alternative to setting a default relink folder, as it handles the relinking process dynamically based on file changes.
Querying and Managing Links: With Tree Shade, you can query all instances where a file is placed across different projects. This is particularly useful for managing assets across multiple documents and can streamline the process of updating links, making it more efficient than manually adjusting settings in each file.
Thumbnail Export and Navigation: Tree Shade also offers the ability to auto-export document pages as thumbnails. These thumbnails can be opened directly in Adobe Bridge, and when selected, the corresponding InDesign document opens right to the specific page, which makes navigating large projects much more intuitive.
While this doesn’t directly answer the question about setting a default relink folder via scripting, these features provide a comprehensive approach to managing links that could eliminate the need for such a setting altogether.
If you’re interested in how Tree Shade can fit into your workflow or if you’d like to learn more about the extension, I’d be happy to provide more details. https://exchange.adobe.com/apps/cc/13737/tree-shade
Hm. I’m pretty sure it’s not there. Since it’s not a preference that travels with a document (as far as I can tell), support wouldn’t have been required, and someone cut a corner. (The rule is–or, at least, used to be–if something can touch the document database, it must be supported by scripting. If it isn’t, it won’t appear in IDML or snippets.)
Easy enough to say how it should work, though–it should be a property on app.linkingPreferences that takes one of two enum values.