Skip to main content
Inspiring
October 31, 2018
Answered

relinking multiple instances of the same link in Illustrator

  • October 31, 2018
  • 14 replies
  • 41305 views

Hi,

So I see the latest version of illustrator still doesnt treat multiple instances of the same link as Indesign does. That is if I want to relink 50 + instances of a single file I need to go through each and every link and manually replace them - Why dont you make it function the same as Indesign in that I can chose to relink all instances at once or chose to relink the individual files as I see fit?

Why do you release an entirely new version of the Apps without taking into account basic things like this that people have been requesting for years???

Please add this functionality, its a basic bit of script that greatly increases productivity - Honestly should anyone even really need to suggest this?

Correct answer brazenPhrasin

For those who need this, if your linked file is another .ai, the work around that worked for me was putting the artboard that I want to be linked in the place where the one I no longer want linked was originally placed. eg. I have artboards 1, 2, and 3 in the same order. I was originally linked to artboard 2 and want to be linked to artboard 3. I move artboard 3 into the second position, so now the positions of the art boards are artboards 1, 3, and 2 and save. Back in main work file refresh all the relevant links and it should update the way you want.

14 replies

Participating Frequently
November 1, 2024

Best practices wen you start a new .ai file with links: Create first a v1 mother-folder, in it  a WORK folder and in the WORK folder make a Links folder, don’t re-name it anything else. In the WORK folder you create a v1.ai file and link the images into the Links folder IN THAT WORK folder. If you want to link any image into that .ai file ALWAYS first copy the image into the Links folder and THEN place it into the .ai. This is important for your future sanity, trust me.

Now you want to make changes but keep the v1 version intact in case you need to come back to it: Make a v2 mother-folder, in it create a WORK folder. Then copy the v1.ai file in the WORK folder, rename it v2.ai but you will notice that the links are still connected to the v1 folder!!

How to make sure the links in the v2 search all at once in the v1 Links folder? You can re-link each manually but that is crazy time-consuming. If you try to just copy the Links folder from v1 to v2 Illu doesn’t automatically look there, it still looks in the old v1 folder! So how do you replace all the links at once? (InDesign has an option to do this much easier but the developers of Illustrator are busy with stupid features and not with core functionality of the program, so this is the only work-around we have..)

So: Open the v2.ai

Open the v1 WORK folder and  MOVE (not copy!) the whole (v1) Links folder to the v2 WORK folder

In the v2.ai that you have open in the background Illu will say it lost its links.

Click Yes>Replace and now you have an option to look in a new folder (check the little checkbox at the bottom ”search for missing links in this folder”), point it to the new location of the links in the v2 folder (manually navigate to the right folder or copy-paste the address of the correct folder in the top bar)

Important: COPY BACK the Links folder to the v1 WORK folder so the v1.ai still has its links intact!

Ton Frederiks
Community Expert
Community Expert
August 23, 2024
Participant
August 23, 2024

This is very annoying. They've removed the replace all option. The only solution now is to move the original and create a new one in a new directory but with the same filename as the previous. Not good.

Participant
August 23, 2024

The easiest way is to open the AI file in Notepad and replace all instances of the currently linked filename with the new one, save it and reopen it in Illustrator.

Monika Gause
Community Expert
Community Expert
August 23, 2024

@chris2000  schrieb:

The easiest way is to open the AI file in Notepad and replace all instances of the currently linked filename with the new one, save it and reopen it in Illustrator.


 

If you ever did this yourself, then some details would be interesting.

marcg68495176
Inspiring
June 18, 2024

Surprisingly (?) this is still an issue in 2024. Here is a ChatGPT script that works wonders. It will list all links in the file grouped by file name, ask you to choose one, ask you to choose a new file, and automatically replace all links with the same name.

/**
 * This script replaces all linked files with the same name at one time in Adobe Illustrator.
 * It allows the user to select the link to replace from a list of current links using a drop-down menu
 * and then choose the new file from a dialog.
 */

function replaceAllLinksWithSameName() {
    var doc = app.activeDocument;
    var placedItems = doc.placedItems;
    var linkNames = [];

    // Collect all unique link names
    for (var i = 0; i < placedItems.length; i++) {
        var placedItem = placedItems[i];
        if (placedItem.file) {
            var fileName = placedItem.file.name;

            // Check if the fileName is already in linkNames
            var isUnique = true;
            for (var j = 0; j < linkNames.length; j++) {
                if (linkNames[j] === fileName) {
                    isUnique = false;
                    break;
                }
            }

            if (isUnique) {
                linkNames.push(fileName);
            }
        }
    }

    if (linkNames.length === 0) {
        alert("No linked files found in the document.");
        return;
    }

    // Create a dialog for link selection
    var dialog = new Window("dialog", "Select Link to Replace");
    dialog.orientation = "column";

    var dropdown = dialog.add("dropdownlist", undefined, linkNames);
    dropdown.selection = 0;

    var okButton = dialog.add("button", undefined, "OK");
    okButton.onClick = function() {
        dialog.close(1);
    };

    if (dialog.show() != 1) {
        return;
    }

    var oldFileName = dropdown.selection.text;
    var newFile = File.openDialog("Select the new file to replace " + oldFileName);

    if (newFile) {
        var count = 0;

        for (var k = 0; k < placedItems.length; k++) {
            var placedItem = placedItems[k];
            if (placedItem.file && placedItem.file.name === oldFileName) {
                placedItem.file = newFile;
                count++;
            }
        }

        alert(count + " links have been replaced.");
    } else {
        alert("Operation cancelled or no file selected.");
    }
}

replaceAllLinksWithSameName();
Participant
July 5, 2022

THANK YOU SO MUCH!
This works.. surprisingly!

Participating Frequently
May 3, 2021

I can understand the issue of having super big file when you have just copies of the same instance.
But for the replacement issue, I dont understand why you don't just replace te original file instead of relink each instance inside Illustrator.

DRock22
Inspiring
June 7, 2021

I know in my workfow, we are using extremely large files, so when making proofs for customers we use low res versions of all the links to keep from bogging down the computer and to increase efficiencey of our workflow. We keep seperate files for high res and the low res so we don't accidently send low res files to printing. So we need to relink files. 

Participating Frequently
June 7, 2021

I simply use 2 folders, "links" (with the low resolution files) and "links_hi" (with the real stuff). When I need to make the press files, i simply rename "links" to "links_lo" and "links_hi" to "links".

I almost never use relink, even if the client ask me to replace an image,  I just replace the file.

Participant
November 3, 2020

I absolutely hate this. When working on multiple sketches of a design in the same doc the whole file becomes super big just because I'm using an image. Every time I copy the design, it copies another instance of the image instead of just using the same instance.

Participant
October 1, 2020

Hi,

I was dealing with the same issue a long time and I finally found a way to do it. It is really simple. Once you have your linked instances in a document, save it and then, if you want to change all instances at once, just move original instance to another folder. Illustrator will tell you, that some links are missing and if you want to re-link them. Hit yes button and then Illustrator will show a box where you can re-link or ignore it. Click a little checkbox on the left to change it all at once.

Now all your linked instances should be changed.

May 10, 2021

You're the bomb! Such a simple work around and you saved me so much time 🙂 Thank you!

 

ceyhun_akgun
Legend
June 24, 2019

This is a separate forum platform for your suggestions for future releases.

You can transfer your thoughts to this section if you want to come to life in future versions.

Illustrator Future Forum

Graphic Designer Educator / PrePress Consultant
Inspiring
June 26, 2019

I already have, they wont do it unless they want to. they dont care about their customers.

CarlosCanto
Community Expert
Community Expert
June 27, 2019

Hi courtney, let's give it another try. I have written several variations of the script try versions 1 to 3 and other clones below. If none of these work, please post screen shots of what you need, I might be able to adjust the script for your needs.

Re: Is there a way to create a keyboard shortcut to relink images in Illustrator CS5?

Remember last folder location lost with Mac Lion updates

Re: [ Branched ] How to relink all embedded images under clipping mask