Copy link to clipboard
Copied
Since Lion or Mountain Lion, we have had an annoying problem where the last folder location is not remembered in Illustrator. For example when updating links on multiple files, would like for the folder location to return to the last one used, but this would go to some folder 3 levels higher/
Found
http://www.stclairsoft.com/DefaultFolderX/
fixes this. But hoping someone else has another solution as having to buy that for each computer would get costly for somethng that used to work. Also the software seems to not have bneen updated in a long time, adn don't wnat a solution that won't last. Am on 10.8.2.
got it, this version lets you pick on image to replace all your selected images in the artboard, with this one, you don't need preselection, right?
...#target Illustrator
// script.name = relinkAllSelected_v3.jsx;
// script.description = relinks all selected placed images at once with a single file;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11; version 3 - 07/25/13
// script.elegant = false;
Copy link to clipboard
Copied
I've been using DefaultFolderX since the 90s. It lasts.
Copy link to clipboard
Copied
Another person running 10.7 does not have this, so I believe this is with 10.8.2 & CS5 for sure, (though I worked somewhere else in 2012 and thought I saw this under 10.7).
Anyone else running 10.8 mac & CS5, can you confirm you have this problem??? Really annoying.
Copy link to clipboard
Copied
What are other people with 10.8.4 experiencing, is this a problem with every 10.8.4 and CS5 (possibly CS6) combination? My 30 day trial expired and still waiting on our IT person to purchase default folder.
Copy link to clipboard
Copied
how about this Mike, the file opening dialog is handled by the OS, if it still does not remember, I could manually try to code it to stay in a folder.
select a couple of images before running, to test,
#target Illustrator
// script.name = relinkAllSelected_v2.jsx;
// script.description = relinks each selected placed images one at the time;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11; version 2 - 07/25/13
// script.elegant = false;
var idoc = app.activeDocument;
sel = idoc.selection;
if (sel.length>0)
{
for (i=0 ; i<sel.length ; i++ )
{
if (sel.typename == "PlacedItem")
{
var iplaced = sel;
var ifile = iplaced.file;
var file = File.openDialog ("Select file to replace " + ifile.name);
if (file!=null) // skip if user Cancels
iplaced.file = file;
}
}
}
else
{
alert("select at least one placed item before running");
}
Copy link to clipboard
Copied
Got an error, in CS5 Mac.
Copy link to clipboard
Copied
Lion?
try this one
#target Illustrator
// script.name = relinkAllSelected_v2.jsx;
// script.description = relinks each selected placed images one at the time;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11; version 2 - 07/25/13
// script.elegant = false;
var idoc = app.activeDocument;
sel = idoc.selection;
if (sel.length>0)
{
for (i=0 ; i<sel.length ; i++ )
{
if (sel.typename == "PlacedItem")
{
var iplaced = sel;
var ifile = iplaced.file;
var file = File.openDialog ("Select file to replace " + ifile.name);
if (file!=null) // skip if user Cancels
file = new File(file.fsName.replace("file://","")); // Mac OS Lion fix by John Hawkinson
iplaced.file = file;
}
}
}
else
{
alert("select at least one placed item before running");
}
Copy link to clipboard
Copied
The Lion fix got the script working.
Turned off default folder X and atleast the folder location held, but the image was not highlighted as it was per default folder. Would be nice if the script could ask you only once what the replacement image is for multiple selections.
Will have to restart, look at this more thoroughly, but the script will be helpful thanks!
Copy link to clipboard
Copied
Would be nice if the script could ask you only once what the replacement image is for multiple selections
what do you mean? do you need one image to replace multiple images in the canvas?
but the image was not highlighted as it was per default folder
what do you mean here?
Copy link to clipboard
Copied
Multiple Selections
Yes to your question. Suppose you are working on a pizza box, and you have to update a pizza slice image on all panels of the box, would be nice to be able to only get prompted once for the filename.
Highlighting
Basically preselection. With default folder X if I have 6 images selected, and click on the update link button, after updating one image, then for the next 3 image updates the previous selection remains highlighted (as shown in dark blue below). That way I only need to hit enter.
Copy link to clipboard
Copied
got it, this version lets you pick on image to replace all your selected images in the artboard, with this one, you don't need preselection, right?
#target Illustrator
// script.name = relinkAllSelected_v3.jsx;
// script.description = relinks all selected placed images at once with a single file;
// script.required = select at least one linked image before running;
// script.parent = CarlosCanto // 7/12/11; version 3 - 07/25/13
// script.elegant = false;
// http://forums.adobe.com/thread/1169224?tstart=0
var idoc = app.activeDocument;
sel = idoc.selection;
if (sel.length>0) {
var file = File.openDialog ("Select file to replace all selected placed files");
if (file!=null) {// skip if user Cancels
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;
}
}
}
else alert ("Cancelled by user");
}
else alert ("select at least one placed item before running");
Copy link to clipboard
Copied
THANKYOU!!! Yes no need to preselect since you got multiple replacements working.
Copy link to clipboard
Copied
Thank you so much, this is really handful.
Copy link to clipboard
Copied
im running Mojave and Illustrator CC but i have embeded images which i want to re-link. the script is not working. i dont get any error. it just doesnt re-link the images. is it Mojave and CC or its because my images are embeded?
Copy link to clipboard
Copied
it's because the images are embedded
try the script in this thread
Re: [ Branched ] How to relink all embedded images under clipping mask
Copy link to clipboard
Copied
Moving the discussion to Illustrator Scripting​ community.
Copy link to clipboard
Copied
Hey Carlos,
Thank you for all your help on this. I am sure I speak for all of us when I say your support is greatly appreciated.
I have a question...I work in a print shop as a designer and I use InDesign for many of our digital printing jobs and having a script that will relink multiple images at once would be amazing. I have tried to insert this script into InDesign and when I run it I get an error that basically says it doesn't recognize line 17 "if (sel.typename == "PlacedItem") {". We are running PC's (unfortunately) and I am not sure if that is what the issue is or not, but if you have any suggestions on what I might be able to do to fix this I would be so greatful!
Again thank you for all your help!!!!
Jeremy
Copy link to clipboard
Copied
InDesign and Illustrator name their objects differently, I don't do InDesign, let me see if I can port it.
Copy link to clipboard
Copied
I was using this script for a while and it worked great until my work computer was updated to El Capitan. Any word on an update I could do to the script that would make it work again?
Mac OS 10.11.1
Copy link to clipboard
Copied
Just wanted to report Default Folder is still working in 10.10.5 Yosemite. See no reason to upgrade to El Captan and with the problems reported am staying away until the risk is worth the reward. Cannot believe more people have not complained, and that Adobe & Apple have not come together on this. My guess is that this is not happening on windows, so I really see Apple needing to be a part of this.
Copy link to clipboard
Copied
If it was up to me I would not go higher than 10.9.5, But since my work place updated it I have no choice but to find a work around.
Copy link to clipboard
Copied
Stopped working for me running el capitan and the the Illustrator 2015 2.0 release