• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
2

Relinking files in Illustrator

Participant ,
Jul 11, 2011 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
Import and export

Views

128.2K

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 guidelines
Adobe
Community Beginner ,
Jul 11, 2011 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.

Votes

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 guidelines
Participant ,
Jul 12, 2011 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.

Votes

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 guidelines
Community Expert ,
Jul 12, 2011 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.

Votes

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 guidelines
Participant ,
Jul 12, 2011 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.

Votes

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 guidelines
Community Expert ,
Jul 12, 2011 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

Votes

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 guidelines
Participant ,
Jul 12, 2011 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.

Votes

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 guidelines
Community Expert ,
Jul 12, 2011 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

Votes

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 guidelines
Participant ,
Jul 12, 2011 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.

Votes

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 guidelines
Community Expert ,
Jul 12, 2011 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[i].typename == "PlacedItem")
                        {
                            var iplaced = sel[i];
                            iplaced.file = file;
                         }
               }
     }
else
     {
          alert("select at least one placed item before running");
     }

Votes

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 guidelines
Community Beginner ,
Aug 25, 2011 Aug 25, 2011

Copy link to clipboard

Copied

Great script!

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

Votes

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 guidelines
New Here ,
Feb 28, 2017 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

Votes

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 guidelines
Community Expert ,
Feb 28, 2017 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?

Votes

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 guidelines
Explorer ,
Jul 18, 2017 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!

Votes

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 guidelines
Community Expert ,
Jul 19, 2017 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.

Votes

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 guidelines
Explorer ,
Jul 20, 2017 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!

Votes

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 guidelines
Community Expert ,
Jul 21, 2017 Jul 21, 2017

Copy link to clipboard

Copied

can you share a sample file?

Votes

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 guidelines
Explorer ,
Jul 21, 2017 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.

Votes

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 guidelines
Community Expert ,
Jul 24, 2017 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[i].typename == "PlacedItem") {

                var iplaced = sel[i];

                iplaced.file = file;

            }

          if (sel[i].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[i].position;

 

 

                h = sel[i].height;

                w = sel[i].width;

                x2 = sel[i].left;

                y2 = sel[i].top;

 

 

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

              

                sel[i].remove();

            }

      }

}

else

    {

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

    }

Votes

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 guidelines
Explorer ,
Jul 24, 2017 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! 

Votes

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 guidelines
Community Expert ,
Jul 24, 2017 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.

Votes

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 guidelines
Explorer ,
Jul 24, 2017 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?

Votes

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 guidelines
Community Expert ,
Jul 25, 2017 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

Votes

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 guidelines
Explorer ,
Jul 25, 2017 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.

Votes

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 guidelines
Community Expert ,
Jul 25, 2017 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?

Votes

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 guidelines