Highlighted

Relinking files in Illustrator

Explorer ,
Jul 11, 2011

Copy link to clipboard

Copied

Greetings all;

I am experiencing a problem with relinking files. I often place images in Illustrator documents and then find that I need to move the file that the placed image draws from. After moving the file to another folder, I of course have to show Illustrator where it can find the file.

The problem I am experiencing is that when I select "Apply to all", I still have to select the file for each placed instance. Does anyone know how I can fix this?

Topics

How to, Import and export

Views

64.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Relinking files in Illustrator

Explorer ,
Jul 11, 2011

Copy link to clipboard

Copied

Greetings all;

I am experiencing a problem with relinking files. I often place images in Illustrator documents and then find that I need to move the file that the placed image draws from. After moving the file to another folder, I of course have to show Illustrator where it can find the file.

The problem I am experiencing is that when I select "Apply to all", I still have to select the file for each placed instance. Does anyone know how I can fix this?

Topics

How to, Import and export

Views

64.4K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Jul 11, 2011

Copy link to clipboard

Copied

A workaround can be:

Place a check mark next to Apply To All and then click Ignore.

Now, open Links panel (Windows> Links).

Cmd + click on all the missing links (links having question mark sign) and then click on relink button at the bottom of the Links panel.

Navigate to the folder location where your linked files are.

This will keep the folder open until all the missing files have been linked.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 12, 2011

Copy link to clipboard

Copied

Sia user;

I tried what you suggested, but I still have to link each file individually, which is a lot of work when you have thirty some instances of the file. Thanks for the idea, though.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 12, 2011

Copy link to clipboard

Copied

If you moved the placed images next to the illustrator file , then your file will open without warning.

The other advantage is you will not get broken links when:

  1. Archiving to a dvd
  2. Sending a DVD or ftp to a printer or any other third party

You need a good method for organizing your files, for this to work. What works and is utilized in most of the places I contract for is to put the job number at a the beginning of the file name for your Illustrator files. This helps seperate your .ai files from all your other files. If you do not use job numbers you can use somehting like 2011-06-filename.

I realize everyone has different needs and issues like duplicate images, but wanted to share what works for me and many others incase this is of any use to you.

Picture 1.png

I also highly recommend a program called Artfiles for gathering your font & images for illustrator files. The new update coming out is loaded with new features.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 12, 2011

Copy link to clipboard

Copied

Mike;

It sounds like you are suggesting that I keep the placed files and the Illustrator file in the same folder. Is that correct?

Personally, I prefer to organize all of the file elements into families with different folders so I can access the files quickly if I need to edit them. Sometimes I reorganize the families part way through the project, which means I need to relink the files. In previous versions of Illustrator, relinking one instance always update the remaining instances.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 12, 2011

Copy link to clipboard

Copied

No problem as long as you are organized no matter what method you use Illustrator will be very good to you. This should help you with updating your links:

Edit >> Preferences >> Update Links >> Automatically

Picture 3.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 12, 2011

Copy link to clipboard

Copied

Mike;

I tried changing the settings in preferences, but unfortunately it didn't work. I still had to relink each instance despite selecting the "Apply to all" checkbox.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 12, 2011

Copy link to clipboard

Copied

Are you choosing repair, or replace? Choose repair. If any other files, even ones with different names are in that exact same folder, Illustrator is smart enough to relink them.

Picture 2.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 12, 2011

Copy link to clipboard

Copied

I have tired both "Repair" and "Replace", both with and without "Apply to All" checked, but to no avail.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 12, 2011

Copy link to clipboard

Copied

Hi alpinemice, this script will do it, select all images you wish to relink and run the script

#target Illustrator

// script.name = relinkAllSelected.jsx;
// script.description = relinks all selected placed images at once;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11;
// script.elegant = false;

var idoc = app.activeDocument;
sel = idoc.selection;
if (sel.length>0)
     {
          var file = File.openDialog ("open file");
          for (i=0 ; i<sel.length ; i++ )
               {
                   if (sel.typename == "PlacedItem")
                        {
                            var iplaced = sel;
                            iplaced.file = file;
                         }
               }
     }
else
     {
          alert("select at least one placed item before running");
     }

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Aug 25, 2011

Copy link to clipboard

Copied

Great script!

Thanks for posting. I used it and it saves a ton of time. yodabest.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Nov 18, 2015

Copy link to clipboard

Copied

Hi, I am looking at this feature in CC 2015, and am unable to see the "Repair" options. Does it still exist?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Feb 28, 2017

Copy link to clipboard

Copied

This script isn't working for me, is it supposed to be placed in the illustrator scripts folder? right now i'm running it from my desktop. I saved your code into a WordPad file and saved it as a .js file - for some reason in illustrator "File > scripts" will only show me .js files as an option to click, the .jsx files do not show up

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Feb 28, 2017

Copy link to clipboard

Copied

Two things. Did you save the file as a plain text file ( TXT not RTF) and did you use the .jsx extension?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 18, 2017

Copy link to clipboard

Copied

CarlosCanto, I couldn't get this script to do anything. Ran it from AI CS6 (Mac) with a linked object selected, and selected the new file to link to, but nothing happened. Tried with single objects and multiple, and with both embedded and already linked objects. Any tips? Would be a great time saver if it worked. Thanks!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 19, 2017

Copy link to clipboard

Copied

Hi Aaron, I just tried it and it works fine with Linked images. I just realized it doesn't work with Embedded images, it shouldn't work, the property I used is "read only", so we can't update it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 20, 2017

Copy link to clipboard

Copied

I see. Thanks Carlos. Any chance it could be modified? I often have scatter plot graphs coming in from Excel where the plot point itself (circle, diamond, etc.) appears in AI as an embedded link. These are low-res and there can be 300 of them; manually relinking each one to a separate vector file of my creation is, as you can imagine, a very time-consuming (and finger-aching) task!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 21, 2017

Copy link to clipboard

Copied

can you share a sample file?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 21, 2017

Copy link to clipboard

Copied

Hi Carlos. Sure; please see 2 files here:

'Plot sample' shows the Excel plot as pasted into AI. (Look on artboard 1.)

Dropbox - Plot sample.ai

You'll see in Links panel that all of them are raster, embedded. You can relink each point to 'Data point vector' file:

Dropbox - Data point vector.ai

Let me know what you find out!

Thanks.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 24, 2017

Copy link to clipboard

Copied

Hi Aaron, try this version. Select your Embedded images before running. For your sample, I unclipped the dots before running.

relinkSelection.JPG

// script.name = relinkAllSelected_rasters.jsx;

// script.description = relinks all selected placed images at once;

// script.required = select at least one linked image before running;

// script.parent = CarlosCanto // 7/12/11; Update 7/24/17;

// script.elegant = false;

var idoc = app.activeDocument;

sel = idoc.selection;

if (sel.length>0) {

      var file = File.openDialog ("open file");

      file = new File(file.fsName.replace("file://","")); // Mac OS Lion fix by John Hawkinson

    

      for (i=0 ; i<sel.length ; i++ ) {

          if (sel.typename == "PlacedItem") {

                var iplaced = sel;

                iplaced.file = file;

            }

          if (sel.typename == "RasterItem") {

                var iplaced = idoc.placedItems.add();

                iplaced.file = file;

                var fctrx = iplaced.width/2; // get the rectangle's center coordinates

                var fctry = iplaced.height/2; //                  iplaced.position = sel.position;

                h = sel.height;

                w = sel.width;

                x2 = sel.left;

                y2 = sel.top;

                iplaced.position = [fctrx-w/2+x2, fctry+y2+h/2];

              

                sel.remove();

            }

      }

}

else

    {

          alert("select at least one placed item before running");

    }

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 24, 2017

Copy link to clipboard

Copied

Hi Carlos, thanks for taking the time!

I tried the script, following your instructions, but got this error:

This was true whether all clipping masks were released or not.

Like, not a very helpful message! 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 24, 2017

Copy link to clipboard

Copied

Hi, I think you grabbed more text than needed when you copy. Make sure the script ends at the curly brace.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 24, 2017

Copy link to clipboard

Copied

Doh! Rookie mistake. Thanks Carlos. Works now, although I am getting a ton of these messages:

...with lots of beach ball spinning in between each. I fear it may be doing it for each instance of relinking. I ended up force-quitting. Any way to resolve that?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 25, 2017

Copy link to clipboard

Copied

are you getting the error message on the sample file you posted?

the beach ball it's normal, it takes time to process but it's still working, just let it finish. Your sample file should take around 10-15 seconds

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 25, 2017

Copy link to clipboard

Copied

No, the original 'like' error is not happening now that I've cleaned up the code I pasted.  But if I just let the script do its thing, it will eventually pause and demand my attention with that relink message, and no matter how I respond to it, it seems that (each time with long waiting between), dozens (> 100?) more will follow.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Jul 25, 2017

Copy link to clipboard

Copied

no, I meant the Illustrator sample file. do you get the message processing the ai file you sent me?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 25, 2017

Copy link to clipboard

Copied

Yep, it was on that exact same file.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Mar 09, 2018

Copy link to clipboard

Copied

Hi,

@CarlosCanto, I have used your script version for linked images. It works very nicely but I’d like to use it differently.

I have multiple placed images that have clipping masks so when I try to run your script, it won’t work because the selection is not directly the placed image, it is a group.

Any workaround you can think of?

Thank you very much in advance.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Adobe Community Professional ,
Mar 10, 2018

Copy link to clipboard

Copied

Hi idsl, are you using the script in post #9?

if you are, and if you don't mind replacing all link images as opposed to only the selected images

change this line

sel = idoc.selection;

to this

sel = idoc.placedItems;

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Community Beginner ,
Mar 12, 2019

Copy link to clipboard

Copied

HeyCarlosCanto​! Could you help if we have many embedded images and they have the clipping mask too? Thank you

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Feb 28, 2017

Copy link to clipboard

Copied

It is a plain text file, i used the .jsx extension, but it is not able to be used from illustrator as a script. The only items I see as options for scripts through illustrator end in .js

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jun 15, 2017

Copy link to clipboard

Copied

After experimenting with Packages, I found that Illustrator will always look for a "Links" or "links" folder with placed files.

It has to be in the same folder as the AI document.

You can them move the Illustrator file and its placed files where you want and every time you open the AI file the links will be automatically updated.

Illustrator will only look for a "Links" folder if the original, absolute, links are broken.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Explorer ,
Jul 19, 2017

Copy link to clipboard

Copied

Here are two videos for AI CC 2017 regarding working with linked images and working with the Links panel that might be helpful:

Placing linked images into Illustrator from Illustrator CC 2017 Essential Training by Tony Harmer

Working with the Links panel from Illustrator CC 2017 Essential Training by Tony Harmer

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
New Here ,
Dec 13, 2019

Copy link to clipboard

Copied

As I am retired now, I am accountable only to myself so to speak.  So... I have piled several(!!) image files onto my desktop due to my laziness, which have been placed in many different AI files...but the AI files are properly stored in the Documents folder according to job.  I have learned that if I clean away the image files from off their home on my Desktop, that when reopening the AI file they do not show up and have that question mark (which was discussed in a previous message).  MY QUESTION IS, IS IT POSSIBLE THAT WHEN I "ARCHIVE" THOSE AI FILES ON TO AN "EXTERNAL DISK", THAT AI MIGHT HAVE AUTOMATICLLY RETAINED THE PLACED IMAGES (or possibly embedded them) WITHIN IT (IN THE ARCHIVED FILES) EVEN THOUGH THE AI FILE IN MY DOCUMENTS FOLDER HAS LOST THE LINK?  COMPRENDE?  THANK YOU, ROBERT

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...