Updating all multiple linked files
Hello all, again. I am needing to update multiple linked files within one document. The linked objects are on different layers. Can I get some suggestions on how to make this work?
Hello all, again. I am needing to update multiple linked files within one document. The linked objects are on different layers. Can I get some suggestions on how to make this work?
in the code you posted above you declare plc to be an array of all placed items.
then you just alert plc which will always give you "[PlacedItems]"
try changing the alert to:
alert(plc);
this will give you "[PlacedItem ]" for each placed item
give this a go.
open a new document, and place 1 image in it.
run this code:
var doc = app.activeDocument;
var plc = doc.placedItems;
for(var i=0; i<plc.length;i++){
try{
alert (plc.file);
}catch(e){
alert(e);
}
}
it should give you the file name of the linked image.
now go and rename the image, then re run the above code.
it should now say "Error: There is no file associated with this item"
this is because the link has been broken.
let me know how you go.
this should help in understanding the way files are linked.
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.