• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Script to toggle "Hide New Layers When Updating or Relinking" Preference

Community Beginner ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

Hello erveryone, 

 

this might be asked before but I wasn't able to find anything helpful yet. 

 

Does anyone know if there is a way to toggle "Hide New Layers When Updating or Relinking" in the InDesign Preferences under File Handling on or off via script. This should be some kind of Application Preference but I wasn't able to find it yet. 

 

 

C.

TOPICS
Import and export , Scripting , UXP Scripting

Views

166

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

There's an object linkingPreferences, which has two properties:

 

LinkingPreference.findMissingLinksAtOpen
LinkingPreference.checkLinksAtOpen

 

You'd expect 'Hide New Layers When Updating or Relinking' here since it's in the same panel in the interface, but it's not. Looks as if you're out of luck as far as I can see.

 

Though finding preference properties in the object model can be tough because naming and placement sometimes defy logic.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

First of all many thanks for your reply, Peter! 

 

To be honest I didn't expect to find the property under linkingPreferences though it was one of my first guesses.

 

What I found and what sounded promissing, at least to me, was this: 

https://www.indesignjs.de/extendscriptAPI/indesign-latest/#UpdateLinkOptions.html

 

My guess was to set UpdateLinkOptions somehow to KEEP_OVERRIDES could be a solution, but I am (still) fairly unexpierenced in scripting and I have to confess that my guess might be a quite stupid one. 

 

Although I don't want to waste anyones time, would it be possible to explain shortly how I could use UpdateLinkOptions in some kind of manner that makes sense. Maybe that gives me room to develop another solution. 

 

C.

 

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 21, 2024 Aug 21, 2024

Copy link to clipboard

Copied

LATEST

UpdateLinkOptions is a property of graphicLayer, which applies only to PSD and PDF files. So I don't think that that's relevant for you. And since it's a checkbox in the interface you'd expect the property to be a boolean, no an enumerated object.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines