5 Replies Latest reply on Nov 11, 2013 11:05 AM by CarlosCanto

    Relink many files at once

    Merrilldavid

      I was wondering if anyone can help.  I'm using Illustrator CS6.  I have an artboard with 200 of the same placed file.  I now want to use this same layout for 30 other views, they are the same size, but different images.  If I relink them I have to click through each one.  I tried using a script I found on here by Carlos:

       

      #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)

           {

              

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

                     {

                         if (sel[i].typename == "PlacedItem")

                              {

           

                                  var iplaced = sel[i];

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

                                  iplaced.file = file;

                               }

                     }

           }

      else

           {

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

           }

       

       

       

       

       

       

      and I get an

       

      error 25:  Expected: }.

      Line:10

      ->  p.p1 {margin: 0.0px 0.0px 12.0px 0.0px; font: 12.0px Times}

       

      Any Ideas?  I'm on a mac, os x 10.6.8.  and I copied the script into the script preset folder so its starting  from the drop down menu.  Don't think I'm leaving anything out.  I'm swapping 1 placed(linked) PDF for another.

       

       

      Thanks

      Marcus