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
ADVERTISEMENT
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
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
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
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
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
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
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
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
May 21, 2013
I need to place a logo at the bottom of the image in eps.
i have created the logo as symbol, can this symbol could be placed at the bottom of the image.
View 3 Replies
View Related
Oct 23, 2013
the options given are rarely used the most important one is missing
find and replace paragraph returns indesign does it elegantly, but illustror has been the same for years with obsolete options
how hard it is just to use the same functions that ADOBE indesign, this is a terrible case of incosistency between the two products when claiming total integration to me is an epic fail, i would have fired my employes over this
View 1 Replies
View Related
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
View Related
Feb 5, 2011
If I right click on a symbol instance, I get a menu item, "Break link to symbol." How can I do that same thing in Javascript?
1) That is, how do I use Javascript to break the link between a SymbolItem and the Symbol it represents? (i.e. without deleting the Symbol?)
2) Once the link is broken, how do I locate the Layer that was created when the link was broken? That is, once the link is broken, it is no longer a SymbolItem; it becomes a Layer instead. How do I locate that Layer?
3) How do I convert the Layer to a GroupItem?
View 5 Replies
View Related
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
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
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
May 31, 2012
is there a way to extend existing classes? I am trying to add methods to the symbolItems class, but it doesn't seem to work. says it is not defined:
symbolItems.prototype.isIn = function(parentItem, runThis) {
//do something
}
View 5 Replies
View Related
May 31, 2012
I'm having difficulty writing a script that deletes all of the symbols in the document (as opposed to just breaking links or expanding which I apparently cannot do). app.sourceDocument.symbols.removeAll();When it reaches a symbol that's used in the document somewhere it spits out this error: Error 1200: an Illustrator error occurred: 1346458189 ('MRAP')
View 11 Replies
View Related
Aug 11, 2012
I'm trying to swap symbols in situ by changing the 'name' property of the symbol instance.
My rudimentary script can find the existing symbol name (for me, that's a small triumph!). The Illustrator document has two symbols in the Symbols panel, 'blue_square' and 'red_circle'. I run the script with an instance of 'blue_square' (and nothing else) on the page, and try to change the name to 'red_circle':
var docRef = activeDocument;
var symbolitem = docRef.symbolItems[0]
var symbolname = symbolitem.symbol.name;
var newname = "red_circle";
symbolitem.selected = true;
// this next line causes the problem:
symbolitem.symbol.name = newname;
This causes an error - 'the name is in use'.
View 14 Replies
View Related
Sep 6, 2012
I'd like to fill a shape with instances of a symbol. The sybmols should vary in size but never touch each other or the outer edges of my shape. Is there a script that can do this?
[URL]
View 1 Replies
View Related
Sep 12, 2013
How to do it ?
View 4 Replies
View Related
Mar 25, 2011
How to create a single symbol from all the objects within a single layer.
Despite what the reference docs say, it doesn't seem that PageItems is a valid argument to pass into Symbols.add()...
Some example code?
View 7 Replies
View Related
Jan 29, 2014
I am now trying Creative Cloud and I came with this bug. When I use a simple action to find and replace a text string in my file it will crash the Illustrator.
My actions is pretty simple:
Find > "aa" (I do have to check all the options to work)
Find and Replace > "aa" to "2014.01.29"
This action works well if I use it once by the Edit menu, but if I close the Illustrator and reopen, it'll not work again and will crash the software. Everyday I do update my action to actual date, so the action will work normally but sometimes I do have to close the app and I have to make the action again and again everytime.
This was a problem already in CS5, last version that I used. I'm using Windows 8.
View 3 Replies
View Related
Feb 23, 2012
i have a csv file that has 6 columns, PNEZD and a 6th column which is my notes..i type a star in the data collector after my code, make my note, and then find/replace after i export it and replace star with a column..that gives the desired 6th column in excel that my boss wants....problem is he also wants to see that next to the Full Description in Civil 3d 2012...i tried adding a Point File Format with a 6th Column, User Defined, String for type...named the column Notes...but if i go to edit the point there is no 6th column in the Tool Palette.
View 1 Replies
View Related
Mar 17, 2012
Is there some kind of script that copy text box attributes (X, Y, W, H) and contents (text) and apply the to new text box?
that is the steps to do this procsses
1- create new text box
2- copy the width attribute and apply it on the new text box, I repeat this with with X, Y, Hight attributes.
3- copy the content to the new box
4- delete the old text box
View 2 Replies
View Related
Sep 19, 2013
How to adjust 9 slice scaling guides of symbol by script?
View 1 Replies
View Related
Feb 25, 2012
I've been trying to pull together the right info to use JavaScript to create a form to bring in particular symbols from the symbol library based on the variables taken from the form. I've taken bits and pieces from various sample scripts and tried to make this work, but my problem appears when I try to use conditionals.This is a limited version of what I want to do, but it is enough to get the point across.
1. I want to select a script that has various dropdown boxes. I would like the first dropdown to give me 3 options: 10, 13, 18
2. I would also like another drop down box that gives me three more options: single needle, double needle, and knife edge.
3. I would then like it to have an "ok" button and "Cancel" button.
4. From here when I click the ok button, a symbol is brought in from the library depending on what parameters were given to the form.
ex. If I selected 10 in the first drop down and double needle in the second, I would like "SYMBOL A" to be pulled from the library and centered on the artboard.ex. If I selected 13 in the first drop down and double needle in the second, I would like "SYMBOL B" to be pulled from the library and centered on the artboard.
I've gotten the UI to pop up and it works as planned as well as bringing in a symbol, my problem comes when I try to incorporate conditionals and functions.Here is my script.
var myDoc = app.activeDocument;var Pallette = new Window ("dialog", "Create a Shell"); Pallette.add ("statictext", undefined, "Fill Opening in Inches:"); Pallette.orientation = "row";var myDropdown = Pallette.add ("dropdownlist", undefined, ["10", "13", "18"]);myDropdown.selection = 1;var myButtonGroup = Pallette.add ("group");myButtonGroup.orientation = "column";var btnCreate = myButtonGroup.add ("button", undefined,
[code]....
View 11 Replies
View Related
May 30, 2012
I think the execution would be relatively easy. how to tell detect if a symbol is within a rectangle vector area. so almost like a parent child relationship in HTML goes? was thinking about getting top bottom left and right of a layer called parent then checking all layers below it (maybe they have "child" naming scene, so i can match by layer name) if the top bottom left and right are >=/<= the one above it. so it is basically detecting if a box is inside another box.
URL...need to detect is symbol1 is within div1 or 2 and same with symbol2
View 4 Replies
View Related
Apr 6, 2012
I'm trying to find a way to loop thru all items in an Illustrator document and get their stroke and fill color. Sometimes items are spots, sometimes documents are set to RGB or CMYK, etc, so swatches can be a mixture of things. Is there an easy way to get the swatch name for each item?
For example, I can check if an item is a spot, and get it's color like so:
var c = app.activeDocument.pageItems[0];
if (c.strokeColor.typename === 'SpotColor') {
var s = c.strokeColor.spot.name;
}
But if I try to get the name from an item colored 'Black' (which is set to Process Color, CMYK), then I'll need to do something else like:
var c = app.activeDocument.pageItems[0];
if (c.strokeColor.typename === 'CMYKColor') {
var s = c.strokeColor.name; // This returns undefined - not sure what I'm doing!!!
}
Is there an easier way to achieve this, other than getting the typename of each item, and then trying to figure out it's color name? I was hoping something like this would work:
var c = app.activeDocument.pageItems[0].strokeColor.name;
View 3 Replies
View Related
Apr 22, 2013
How can I easily find a character if its attribute is different from others? There might be some easier way than compare it one by one.
View 2 Replies
View Related
Jan 24, 2013
I'm trying to find a way to get the links and link statuses in Adobe Illustrator. It doesn't seem to be at all similar to InDesign DOM.
What I'd like to be able to do is check whether a file has a missing link. I have been able to trace it to a "placedItem" which is inherently a "pageItem". So is it possible to find the link status? Been going through the DOM for about a half hour now and still can't find it.
app.documents[0].placedItems[0] <--- How to get link status?
View 2 Replies
View Related