I have developed Tree Shade as a CEP extension for InDesign. One of its feature is fixing the missed links using the special IDs records stored by the extension for Adobe Bridge.
I get a feedback from a user that he has nested InDesign documents and this feature is not working.
Is there a property that check if the placed InDesign document has missed links or not? Because I want to check before executing commands for opening the nested ones to update their links.
And is there nesting hierarchy for scanning the links?
I’m thinking the same thing.
In an ExtendScript project, I place Adobe InDesign documents in other Adobe InDesign documents to allow the equivalent of two people to work on parts of the same document. This is for jumping articles in newspapers. And I don’t recall having any way to check the links in the placed Adobe InDesign document.
One weird thing, is if you do that, and you interrogate Adobe InDesign about its open documents, you’ll see that Adobe InDesign has an open version of the placed document. There’s no layout window and thus nothing for the user to see, but it’s there. So you might not have to physically open the placed file. You might be able to look at all of the currently open documents, infer that one is the placed document, and check the links.
Thanks for all your replies.
I found that there is a property for link object called “links”. Its length is zero except for nested InDesign as a link, then it will has the links in that document.
function checkNestedMissingLinks() {
var doc = app.activeDocument;
var links = doc.links;
var isAllUpdated = true;
for (var i = 0; i < links.length; i++) {
if (links[i].links.length > 0) {
if (links[i].linkType == "InDesign Format Name") {
for (var ii = 0; ii < links[i].links.length; ii++) {
if (links[i].links[ii].status == LinkStatus.LINK_MISSING || links[i].links[ii].status == LinkStatus.LINK_OUT_OF_DATE) {
isAllUpdated = false;
//Write you code here
break;
}
}
}
}
}
return isAllUpdated;
}