Illustrator Scripting :: Replace Layer Names In Selected Layers Only?

Jan 22, 2014

I am using this script to find and replace words in layers. (The script only targets particualr words, rather than the whole layer name).
 
I would like to make it so it targets selected layers only.
 
I have found this script which loops through selected layers only, but I am not sure how to add the find and replace layer name functioality.

View 7 Replies


ADVERTISEMENT

Illustrator Scripting :: Find And Replace Layer Names

Mar 19, 2013

Are there any scripts to find and replace layer names?
 
There is an excellent script available for Photoshop which allows you to not only replace words in layer names, but also insert words as Prefixes, Suffixes and Sequential Numbers. The illustrator version of this script only allows sequential numbering: It doesn't offer find and replacing of words.
 
Ideally, it would be great if there was something that could do multiple find and replaces in one go:

(E.g.
You have layers like this Car, Dog, Bat
You enter: car(Option1), dog(Option2), Bat(Option3)
Your layers then become: Option1, Option2, Option3).
)

View 12 Replies View Related

Illustrator Scripting :: Find And Replace Month Names?

Sep 4, 2013

I have a few eps files in which month-year format is written like May-12, June-13 etc. I want to change May to Mai, June to Juin etc.
 
Virender 
var myDoc = app.activeDocument;
for (i = 0; i < myDoc.textFrames.length; i++ )
{

[Code]....

View 4 Replies View Related

Illustrator Scripting :: Allow To Select Image To Replace Any Number Of Selected Files

Apr 18, 2013

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. 

View 6 Replies View Related

Illustrator Scripting :: Rename Artboards With Layer Names

Mar 7, 2014

I'm looking to create a script to batch rename a number of artboards.
 
- I have 100 named layers.

- I have 100 artboards.

- I would like to rename the artboards to match the layer names.

- The layers are organized in the same descending orderas the artboards (ignoring the actual artboard names*).

- The topmost artboard (1 in the list) would be renamed "newspaper", the second artboard would be renamed "typewriter", the third artboard would be renamed "books", etc.
 
*in the example below the artboard named "Artboard 7" is actually the 6th artboard in list.

View 5 Replies View Related

Illustrator Scripting :: Turn Selected Sublayers Into Top Level Layers

Jun 5, 2008

I wanted to ask if by chance any of the scripting gurus here happen to have written an AI script that will take a number of selected sublayers/sub-sublayers and move them so they become top-level layers?

I am really needing this very badly, given that After Effects can only handle AI layers as separate entities. So I find myself moving tens, even hundreds of nested sublayers to the top level all the time.

Is it possible this script exists already?

View 16 Replies View Related

Illustrator :: Copy Parts Of Layers From One AI Doc Into New One With Same Layer Names?

Sep 30, 2013

How do I copy PARTS of layers containing many objects from one CS5 AI (v.15.0.2) doc into a new CS5 AI doc and keep/create the same layer names?
 
To start with, I have one fairly complex AI document with 100 layers,  with several hundred items in each layer. For example, one layer named "Stars" contains  400 separate stars (not grouped), another layer named "Crosses" contains 300 separate crosses, and a 3rd layer named "Text" contains 200 separate words (not outlined).
 
If I select, by marqueeing a section of the image/artboard, some (but not all) of the individual items contained in the several layers, then  paste that selection into a new CS5 AI doc, I cannot get them to  create new layers of the same name. Instead they go into one general layer (e.g. "Layer 101") as a jumble of discrete, but unorganized objects (no layers or sublayers). In other words, I have lost the 3 main layers from which I selected a bunch of objects.
 
Checking "Paste Remembers Layers" has no effect on this result. In fact "Paste Remembers Layers" does not remember layers at all. Only if I select ALL the items in the several layers will it paste those layers by those names into the new doc (or create new layers of the same names).
 
Of course it is a COLOSSAL waste of time copying the ENTIRE document, then pasting the WHOLE thing into the new doc (with layers retained), then deleting the parts I DON'T need.

View 14 Replies View Related

Illustrator Scripting :: JavaScript To Send Selected TextFrame To Current Layer?

Feb 20, 2013

Is there a way to send a selected textFrame item to a layer using javascript?
 
I don't mind if it is send to current layer or some other way to accomplish the task.
 
(Using Adobe Illustrator CS4)

View 5 Replies View Related

Illustrator Scripting :: Moving All Layers Into Single Layer

Nov 20, 2013

I'm new in scripting and i need to make a script that moving all layers into a single layer (in Illustrator i press CTRL+A then CTRL+G in layers and works) but i need that in script.

View 2 Replies View Related

Illustrator Scripting :: Change Layer Colors Within Layers Palette In CS5?

Apr 3, 2012

For example I would like to make my images layer Green and my copy layer Red in my layers palette.

View 6 Replies View Related

Illustrator Scripting :: Raster Multiple Layers In AI Without Flattening To 1 Layer

Aug 8, 2012

I am trying to turn every layer in my .ai file to a raster image without flattening to one layer.
 
-The big issue I am dealing with is the agency that just built a paralax site for us refuses to export to PSD. I have tried every possible way to do this but keep getting the file is to big message. To add to it they had it all on 1 layer. I was able to release to sequence, but now am trying to see if rasterizing the objects will work.

View 1 Replies View Related

Illustrator Scripting :: How To Replace One Swatch With Another

Feb 11, 2014

Is there anyway in JavaScript to replace one swatch with another?
 
I've seen other posts where similar questions have been asked, but the solution seems to involve iterating over all the pageItems, testing and then changing the fillColor.
 
All I want to do is delete/replace a specific color. Say replace Yellow with Green.
 
Is there a way of doing this without recursing through all of the page items?

View 3 Replies View Related

Illustrator Scripting :: Selecting Objects By Group Names?

Feb 17, 2012

How to select objects by their group names?
 
I'm working with imported graphics, and the objects appear in the AI layer hierarchy grouped and named according to their object types in the native program (see the attached image). The problem lies with the annotation objects: they are made of different parts for which different graphic styles are needed; however, they all come in one layer and are difficult to access for global operations. I need to do different things with the different object types (delete the POINT's, move the LINE's and LWPOLYLINE's to different layers, etc...). The option of selecting objects individually is ok for small data sets, but you can imagine this becomes untenable in a hurry.
 
Two possible solutions I've considered:

(1) change the output parameters in the source program such that the objects come into illustrator with different graphics allowing them to be accessed through the "Select same ..." tools; it would work, but is problematic for the source program

(2) print the annotation graphics with their desired graphic appearance to pdf rather than importing the source file directly in AI, then open in AI to render the remaining graphics; again, this works but introduces inefficiency in the process. Also, the print process tends to explode closed paths requiring more inefficient path tinkering in AI.
 
I would like to tell AI to select all objects named "POINT" or "LINE" etc... but have found nothing in the documentation or forums on whether this is possible.

View 1 Replies View Related

Illustrator Scripting :: Localize Names Of Script Folders?

May 25, 2013

i'm trying to get a list of all the scriptfolder names.
 
This will solve path issues with other language versions of illustrator.
 
My script for now:
 
scriptfolder = {
en: "Scripts",
nl: "Scripts",
de: "Skripten"
}; 
var imageiconprinter = File(app.path+'/Presets.localized/' + app.locale + '/'+localize(scriptfolder)+'/idatabase/Images/Infopanel_heinerich/hei nerichinfopanelprinter.png');
  
I've defined a country like de: which is german and put the correct foldername behind it.
 
I would love to have a list of all countrys.
 
if you don't have a list just fill in the foldername and countryname of your country.

View 1 Replies View Related

Illustrator Scripting :: Put Artboard Names In Text Boxes?

Dec 2, 2013

I have an Illustrator document with ~100 artboards, each artboard named by me. Each artboard has one textbox in it. Is there a way to take whatever name I assign to the artboard and print it into the text box inside that artboard? So in the end I would be able to see the name associated with each artboard on the artboard itself. Ideally I could run the script once (i.e. "turn it on"), have it populate all the text boxes with the artboard names, and then have it dynamically update the textboxes when I change an artboard name regardless of whether the file has been closed and opened since I originally ran the script.

View 26 Replies View Related

Illustrator Scripting :: Find And Replace Artboard Name

Mar 26, 2013

Is it possible to use a JS script to find/replace artboard names?  For example if I have artboards that are currently named 39 and 42...can I use a script to change the name of the art boards to 39E and 42C etc?
 
Also part of the script a simple find/replace of text on locked layers.

View 4 Replies View Related

Illustrator Scripting :: Replace GPS Points With A Symbol

Dec 19, 2011

So I am trying to replace gps points with a symbol I have created. I have found blogs referencing a script that can replace selected items with symbols saved in the symbols panel, but I can't seem to find the actual script! Where I can find JET_ReplaceWithSymbol.jsx or any other script that can do the same function.

View 21 Replies View Related

Illustrator Scripting :: Get Names Of Placed Images Into Text File For Database?

Jan 7, 2011

I know nothing about scripting in Illustrator, but am willing and interested to give it a try if this sounds doable.  All we want are the names--just a simple list of the names, such as

7009 LL.eps
Rsb shadow design.psd
3_Pt_STA_475_P3.tif
 
of placed images (in our Illustrator CS5 art) into text that we can either import (from a tab- or comma-delimited text file) or paste into our Filemaker database.
 
Right now everyone is RETYPING the names of all placed images into the database, with consequent mistakes, missed images, etc.  Then when we search our database to find which art uses a certain image...results are not to be trusted.
 
(If we could cut/paste from either the Links palette or Document Info, that'd be fine... but nope.  Not in Illustrator, although we were thrilled to see InDesign CS5 has "Copy Info For Selected Links", which is VERY useful.)  In Illustrator, we can export Document Info to a text file, but artists seem to find that long document too unwieldy, and they revert to typing the names, especially if they only have a couple of placed images... and then we're back to error-laden data no matter how careful they try to be.
 
Is such a script even possible?  If so, where/how might I start?  We're on iMacs with the Adobe CS5 suite (and Filemaker 11, if that matters).

View 13 Replies View Related

Illustrator Scripting :: Replace All Parenthesis Text In Document?

May 16, 2013

I'm a designer and i know nothing about scripting. But actually i would like to remove a bunch of text. I am working on a map, and i need to get rid of all text in parenthesis (the parenthesis included in). I know there will be a faster and efficient way to do it by scripting, but i don't know how to get to that.

View 3 Replies View Related

Illustrator Scripting :: Find And Replace Symbol Content

Nov 18, 2013

I have multiple documents using text as symbols. I need to change a ® 2013 to  a ® 2014 within the symbols. Without having to go into each document and double click on the symbol or break the link, is there a way to do a batch find and replace that will search within symbols to change text?

View 2 Replies View Related

Illustrator Scripting :: Find And Replace Script With Values Via Excel

Feb 18, 2013

I am searching for a simple automated Find and Replace script, the idea is that in Excel the Find and Replace with texts are located. The script finds the textblock in Illustrator and replaces it with the value from Excel "New number".
 
Example Illustrator:

Example Excel Find and Replace:

View 1 Replies View Related

Illustrator Scripting :: Find And Replace Script Using Info From File Name?

Jun 11, 2012

Is it possible to write an Illustrator (CS4) script that would find and replace 2 instances of text using the actual file name to supply the changing text?
 
Our current file naming system uses a Part Number, Catalog Number and Run Date. (example: 123456_ABCDEF_2014 JN)We are currently saving a master file as the new Part Number and simply doing 2 separate find and replace functions for the Catalog Number and Run Date. Unfortunately we have over 500 parts to change and thought we could narrow down the 1000 find and replace to just 500. Although this may not appear like such a time saver, the key factor would mean entering the changing data just once per file, minimizing errors and eliminating proof reading the actual file.
 
Here is what I have used for a simple find and replace script, but I cannot seem to find any information to connect the file name data.
 
[code]

var active_doc = app.activeDocument;
 var search_string = /ABCDEF/gi; // g for global search, remove i to make a case sensitive search
var replace_string = "GHIJKL";
 var text_frames = active_doc.textFrames; 
var search_string2 = /1234 XX/gi; // g for global search, remove i to make a case sensitive search
var replace_string2 = "5678 YY";

[code]....

View 1 Replies View Related

Illustrator Scripting :: How To Replace Instances Matching Height Or Width Of Items

Nov 26, 2011

Im struggling with the correct use of symbol / symbol items in applescript. I can successfully list the symbols used on the page, but I cannot select them. How I can select all the items on the page that are Symbol Items of symbols named "Apples" but not oranges? After that I hope to replace the instances matching the height or width of the items whichever is greater with a 3rd item name. Javascript is always an option as well but I had the same difficulty.

View 14 Replies View Related

Illustrator Scripting :: How To Access Text Boxes In Existing Document And Replace With New Value

Jun 28, 2012

Is there a way to access text boxes in an existing document and replace them with a new value taken from an excel table? I've been able to create new documents from scratch and populate them with excel data, but formating these new documents to look like those we already made is proving more difficult than I thought using just Javascript.
 
Ideally I'd be able specific an index for each text box and replace them in order as i itterate through the excel(or CSV) document.
 
I already have a way to pull from the table, another question asked here, but can't figure out the object model to put the new info in a specific place.
 
Below is what I came up with to create a very rough looking document from scratch:
 
#target Illustrator
var csvFile = new File('C:/users/whatever/spreadsheet.csv');
if(!csvFile.exists){
          alert('notafile');
          app.quit(); }
 
[Code].....

View 3 Replies View Related

Photoshop Elements :: Export Layers With Layer Names To Separate JPEG Files?

Mar 24, 2014

can you export layers with the layer names to separate jpeg files?
 
I have a photoshop psd file with many layers that I want to export to separate files with the new name of the files being the same as their layer name. I have the following programs:
 
Using Photoshop CS4?
Using Photoshop Elements 7?
Using Photoshop Elements 12 (Trial)

View 1 Replies View Related

Illustrator Scripting :: Iterate Through Selected Characters

May 3, 2012

Code snippet to show me how to iterate through the selected text (not the frame!, not the words, only the selected chars) and make any change on the characterAttributes (size, color, etc.)?
 
In the property "app.activeDocument.selection" usually the selected objects are stored as an array. Now when I select characters in a textframe (or TextPath, whatever) there is a [Textrange] in it. I already tried some combinations like this snippet underneath but I still get errors, that selectedChars[i] is undefined.I'm on Illustrator CS4, Mac OS X, Javascript
 
var selectedChars = app.activeDocument.selection.characters;
for (i = 0; i < selectedChars.length; i++ ){                           
selectedChars[i].characterAttributes.fillColor = myNewCMYKColor;

View 14 Replies View Related

Illustrator Scripting :: Get Position Of Selected Object

Oct 4, 2012

is there a way to get position of any selected object? It seems like normally you have to dive into specific item like textFrames to get position, but was curious if there was a generic way of doing this for selected objects.

View 5 Replies View Related

Illustrator :: Layers Names Not Showing

Nov 27, 2012

Someromes on starting a new file, the layer names or layer color does not show. 

View 2 Replies View Related

Illustrator Scripting :: How To Determine The Size Of Selected Text

Sep 6, 2012

I'd like to draw a box around some selected text (a textRange), however I can't figure out how to detemine the size or position of the text.  The overall size of a textFrame is possible to find (not sure about position), but when you've got just a few characters selected I don't see any way to get the size or position. 

View 6 Replies View Related

Illustrator Scripting :: Align Selected Objects To Artboard

Nov 15, 2013

Simple solution to aligning selected items to the artboard. I was going to create an action but then realized it would be more convenient for me to include it in my script file....I have a script to align objects with each other but they dont align to the artboard.

View 11 Replies View Related

Illustrator Scripting :: Convert To Grayscale For Selected Item

Feb 4, 2014

It is possible to apply the Convert to Grayscale(Edit->Edit Colors->Convert to Grayscale) for the selected items in illustrator cs3 in script (javascript)?

View 12 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved