I’m trying to get all linked images from a certain InDesign layer only.
To get all links in an InDesign document i use
set linksTotal to every link of document 1
and if i would like to get every link with a certain status this works fine.
set linksMissing to every link of document 1 whose status = link missing
But for a new project i would like to get every link of one InDesign layer only so i thought i could use something like this
set linksWebTotal to every link of document 1 whose item layer's name is WebLayer
But it does not seem to work, neither does
set linksWebTotal to every link of (layer WebLayer of document 1)
I’m out of ideas, here is a small test script if someone would like to try it out. You will need an InDesign document with two layers and one is labeled WebLinks and both layers need to have at least one image linked to it.
set WebLayer to "WebLinks" tell application "Adobe InDesign CC 2017" set linksTotal to every link of document 1 set linksWebTotal to every link of document 1 whose item layer's name is WebLayer end tell set linksTotalNr to count linksTotal set linksWebTotalNr to count linksWebTotal display dialog "Links total = " & linksTotalNr & return & "Links 4 web = " & linksWebTotalNr
Ps. I have also tried to hide all the other layers and get the links but it does not make any difference when scripting.