Illustrator Scripting :: Relink Many Files At Once?
Jul 25, 2013
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;
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.
I am creating a script on illustrator CS6 that will loop through all the images and relink these images to there current location, it is used to update all of the links in the file. However sometimes when i run this script i will get the error 376('x ') i have searched for the meaning of this and cannot find it anywhere. It is being written in extendscript, the code i am using is shown below:
// execute the main function main(); // Construct the main function function main() { var retVal = "OK"; [code]....
I have been looking for a solution to automate a printing and ordering process. I have a design template with 2 pages both 8.5x11 in size. One page represents the front and other the back for double sided printing. I have 6 different images per sheet so in my links panel I have 12 total links, 2 of each. I was wondering if there is a script to update all the links with the same filename with other image? Currently I have to search through all the images and update each one.
I have 6 artboards dividing the 8.5x11 sheet proportionatly. Each artboard represents a different order. Is there a script to write the linked filename to the bottom corner of each artboard?
When I first started using LR, I converted several folders full of CR2s that had been imported into LR to .dng using the stand-alone DNG Converter and then used the OSX Finder to move those folders to my archive drives. (For those beginners following along - don't do this!!)
I want to re-link LR to those files but find that I need to do the relink routine one file at a time (instead of being able to use the "find nearby missing photos") because LR is looking for an exact match of filename + extension instead of just filename. The problem is that the files on the archve drive have a .dng extension and LR is looking for a .CR2 extension.
Is there a way of having LR look for just the filename? Perhaps a script of some sort?
3000 files to relink - one at a time is not a happy prospect.
(Of course, now I do everything from within LR. Live and learn!)
In InDesign if i move my folder with images just by re-linking one image of the folder ALL will be linke at once by their names. In Illustrator i have to re-link manually one by one. Am i doing something wrong? Should i have some command selected? Can i do it through a plugin?
I manage a design department where we're constantly working with documents that have multiple placed and embedded images in each. As an example, we often have 10 instances each of 4 different images in a given document. These links are constantly changing and being updated on a per-client basis. My concern is that my designers waste a lot of time relinking these embedded graphics as the software prompts the user to relink each one individually. If the designer needs to replace 10 of the linked graphics with, say, "Royal Mahogany", they have to select all 10, select the relink option and specify the file they want to replace the graphic with by clicking on and placing the selected file for each instance of the graphic. So if they're replacing the links of 10 images, they have to select and place the desired file 10 times. Is there any way to select multiple placed images and replace them all at once? Note that the images we place into the file are stored in multiple locations on server, subdivided by material, manufacturer, color, finish etc.
My team is using CS3 mac version currently but we'll be upgrading to CS5 soon. This is a huge time-waster for my company.
There is no way to export PNG-files with a higher PPI than 72. I saw a thread that you could scale the pictures when exporting then script to open Photoshop and resize them? This is the last step in my big script and if i cant get this to work i cant use it.
I found a script that does the job, export tones of ai files to pdf, but I have some files which are in sub folders, and I was trying to find a way to modify this script to include subfolder, but no luck.
Adobe permits you to use, modify, and distribute this file in accordance with the termsof the Adobe license agreement accompanying it. if you have received this file from a source other than Adobe, then your use, modification,or distribution of it requires the prior written permission of Adobe.
This sample gets files specified by the user from the selected folder and batch processes them and saves them as PDFs.
Edits by Patrick Mineault: - only .ai files processed - files saved in same folder as the input files - export files have name (oldname).pdf - PDF settings: editable / acrobatLayers=true for maximum compatibility with Preview
// Main Code [Execution of script begins here] // uncomment to suppress Illustrator warning dialogs // app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS; var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts; // Select the source folder. sourceFolder = Folder.selectDialog( 'Select the folder with Illustrator .ai files you want to convert to PDF'); [code]...
Is there a way to open a file as a layer? I want to open multiple files in the same window to make a collage. Currently, as I open each file they all open in separate windows. The "Open Document As Tabs" option in the User Interface preferences is not selected.
I'm writing a Javascript to run at startup. I want to check for the existence of XML files and process them, if they are available. How can I check for their existence?
I have been working with some illustrator files for a while and all of a sudden I cannot open them anymore. I do not even get an error message. I tried opening them on another computer. They open, but then when I order to re-link the images, the file just shuts down. The files are quite large, but even when I make them smaller (smaller then when they were before this problem started), I still cannot open them. I thought it might be related to the images, but also older files with no new images have the same problem.
We have thousands of files that contain linked images. These files exist in multiple locations and are kept in sync by dfs replication. Since illustrator uses unc path for links, the links that were created are slow to open for users at other locations and we would like to batch relink these files to a dfs namespace or unc path that better serves more users. I have already tested replacing the path in the files via find and replace using notepad but the link does not change when actually opened.
What would be the best strategy on the usage of data set to translate our product packaging. It's quite complex as we have several languages on the same packaging. Moreover, we have different text sources that would require to be translated in different sets of languages.
I have already looked into the data set and I tried to get familiar with it. How to create the data set and how to name the different variables knowing that there are different source texts for a particular region (region means a set of languages) and other texts for another region... The idea is to export this into one XML file with well identified elements that can be split with a tool, sent for translation according to their region then merged back into one single file to be imported back into illustrator
Region 1: en-US text 1 text 2
fr-FR text 1 text 2
de-DE etc...
Region 2: en-US text 3 text 4
ru-RU text 3 text 4
Region 3: etc..
It seems that the formatting such as bold, italic and so on is not exported into the data set which is quite embarrassing.
It is supposed to change hyphens to en-dashes in a ai files in a folder. However, when I run it, it only works on one file. After it makes the change and closes the first file, it stops.
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile, pdfSaveOpts; sourceFolder = Folder.selectDialog; if ( sourceFolder != null ) { files = new Array(); fileType = "*.ai"; files = sourceFolder.getFiles( fileType ); if ( files.length > 0 ) [code]....
I recently found the following jsx script, which saves a multi-layered IL file into 1-layer-per-file with PNG format.
This file is very useful, but i'm currently working on a project that requires the files to be saved into SVG format.
Is there anyway to edit this script to save the files as SVG instead of PNG?
// *** Export Layers as PNG files (in multiple resolutions) *** // // Version: 1.0 (29 Aug 2012) // Copyright Arcticmill 2012 // www.arcticmill.com // Developed by: Johan Otterud // // This script will export all layers that have a name starting with "#", or "%" into a subfolder of the current .ai document. // These options can be configured below: // *** Config options *** var subFolderName = "Export";
[Code]...
Remember that you must add a "" + exportLayersStartingWith + "" (when exporting the layer cropped to it's bound) or "" + exportLayersWithArtboardClippingStartingWith + "" (when layer should be clipped to artboard) to the beginning of the layer name. Also make sure that they layers you want to export are not locked or hidden.");
} else { // Show a completed message alert(layersToExportCount + " layer(s) was successfully exported to: " + exportDirectoryPath); }
I have about 300+ product labels that are in Illustrator, and some of them have an incorrect rich black color swatch. What I have been doing is going through and changing the color pallette to change them manually. Essentially going to the instance of black and changing them to regular black.
Is there any sort of script that can do this? The files are in CMYK.
Otherwise I have a lot of monotonous file editing to do.
I need to find a way to convert a LOT of ai files, individually, to low res pdf's. Preferably with the presets I want, not some defaults. I'm not interested in an action. I was hoping for a droplet, script, or something similar.
I did find this and it looked promising... [URL] ....
That almost worked. Ultimately, for some reason, it couldn't see the ai files sitting in the specified folder.
Is it possible to have a script that would split up an Illustrator file that contains a number of groups of elements into individual files... for example, here is a download link for a file that has different types of moustaches and I want each moustache as an individual file... I have hundreds of Illustrator files like this that have 4, 8, 15, 20 or more illustrations all bunched onto the one file that I need to split up. I'm using CS4 [URL]....
I have a script using the dynamic content plugin from illustrator which takes and XML file and replaces it with a new one. All linked text/symbol/image links have their paths updated or text content updated.
The problem I have is I have background images which are not dynamic so I need to relink these based on their file path.
We have two shares, an OPI & an FPO, because of the size of backgrounf images we keep the FPO links in whilst artworking.
What I'd like to do is relink all images if they contain FPO in their file path, I'm in CS5.1. I had a look and found CS6 has a .relink method but obviosuly this is no use to me in CS5.1
I have a couple thousand AI authored EPS files with a specific swatch name (SpotBlack) that I would like to rename (black) -- is there any method to do this en masse, preferrably outside of Illy using a text editor?
I have 30 separate illustrator pdf files (one page each) that I would like to make into one Illustrator CS6 file with 30 artboards. Is there any way to do that without having to import one by one?
I have about 500 files that I need to change one line of text in. Example. File name is XXX 001, the line of text is the file name so it would read XXX 001. XXX 002... etc. up to XXX 500. Is there a way that I could automate it opening, changing this line of text, saving and closing?
Automated AI so much so that it can read instructions from an external source like xml or txt and automatically creates files and folders.
For example we have something like this: File1 Hello Font: Myriad Size: 22 Colour: Pantone 254C Image 1.jpg (link) Source: Image1.png (link) clipart1.eps (link) ---------- File2
and so on.
I want AI CS5 to: 1. create an eps File1, create a folder named File1, put File1.eps in it 2. type the text Hello, apply Myriad 22pt and PMS 254 to it, centre it to the artboard 3. Place all jpegs, pngs, eps source files on the artboard and embed them. 4. Save the file as eps legacy version 10, close the file and move to the next file.
I've written a script to allow you to select an image to replace any number of selected files. Each file starts out as an embeded image with a .note to determine where the basis of alignment for the new file should be (i.e. "top," "bottom," "left," "right"). You'll find the code below:
#target illustrator
if (app.documents.length > 0) { var docRef=app.activeDocument; var docSelection = docRef.selection; // ** Get new file
[Code]...
For some reason, the ".note" added at the end of the script gets erased once the script is complete. I can even get it to confirm that it applied the note to the image, but once it's complete, it's gone.
I created an Action to batch export a folder of .ai files to create 300dpi .png's of the .ai file's artboard. I did this by simply recording "Export...as png" with my desired settings then Batch running the Action on desired folder of .ai files. The files were successfully exported, the trouble is that the exported files lack a .png file extension. My intent is to take these PNG files and merge them into a single PDF using Acrobat Pro. Unfortunatly, without the .PNG extension, Acrobat Pro does not recognize the file types and does not let me use the Combine Files feature on them. Going back and manually adding a .png at the end of the exported files defeats the time-saving purpose of Batch Processing all together. Is there something I am missing or doing incorrectly? I have included screenshots of 1) My Batch Action settings 2) folders showing files without .png extension and 3) visual of what I see when I am trying to combine PNGs into a PDF.
I try to open mulitple ai files through palette dialog but it fails on Error:8702, there is no document. But if i change to var win = new Window ("dialog", "Batch"); the open file works well.
var txtSourceFolder = win.add("edittext",undefined); var btnOk = win.add("button",undefined,"Run"); btnOk.onClick=function(){ try