Skip to main content
Participant
January 9, 2025
Question

How to re-link multiple CC assets at once?

  • January 9, 2025
  • 1 reply
  • 186 views

I create maps. I add graphics into CC hosted folders which I link within documents. There was a glitch in my computer's hosting and CC considers all my links in a different location than when they were initially linked. I need a way to select multiple links, and re-link all I've selected once. Currently, I have to do all of them, one by one. Does such a script exist for CC based assets? Not local. Thanks.

1 reply

m1b
Community Expert
Community Expert
January 10, 2025

Hi @danal76941030, I don't have much experience with CC library files, but I'll try ... while we wait for someone more knowledgeable!

 

1. If you drag, say, "icon golf.ai" from the Library panel into a new document, does it appear normal in the Link panel and isn't "missing"?

 

2. Do you know how to run scripts? If so, I would like you to (a) select a "good" and a "bad" linked item, ideally both the same asset (eg. Icon Golf) then (b) run the below script. It will save a text file to your desktop listing the linked file paths. Then (c) post that text file here so I can see the differences, if any.

 

- Mark

 

The script is this:

/**
 * Write selected item file paths to a text file.
 * @author m1b
 */
(function () {

    var location = Folder.desktop + "/test-paths.txt";

    var doc = app.activeDocument,
        items = doc.selection,
        paths = [];

    for (var i = 0; i < items.length; i++) {
        var item = items[i];
        paths.push(item.file
            ? decodeURI(item.file)
            : 'No file'
        )
    }

    var f = File(location);
    f.open("w");
    f.write(paths.join('\n'));
    f.close();
    f.execute();

})();