Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

relink all selected

$
0
0

CarlosCanto wrote this script for me years ago, but seems to not work anymore on

Mac OS 10.10.5

CC2015.3

 

Is supposed to relink all instance of an image, as for example on a carton in packaging design we make have the same picture of an apple pie on all 6 sides. Is annoying to run the link panel 6 times rather than one command. This was further aggravated by the Mac OS not remember ing the last location, which default folder used to correct, but that seems to work now.

 

 

 

 

 

 

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

     }


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>