Illustrator Scripting :: Swap Symbol Instance By Changing Its Name?

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


ADVERTISEMENT

Illustrator :: Drag A New Symbol Instance To Artboard And Resize The Instance Alignment With Pixel Grid

Oct 21, 2012

Sometimes when I drag a new symbol instance to my artboard and resize it, the instance looses it alignement with the pixel grid.
 
This happens despite the fact that...
 
I checked the box for pixel grid alignement when I created the documentthe symbol option is set for align to pixel gridthe original shape in the symbol is aligned to pixel grindthe original shape has the align to pixel grid check box in the transform panel checked 
So why when I resize the symbol instance does it break the pixel grid alignmnet and result in a blurred 1px stroke?

View 1 Replies View Related

Illustrator Scripting :: Symbol To Be Placed In EPS File?

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

Illustrator Scripting :: Break Link To Symbol

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

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 :: How To Add Methods To The Symbol Items Class

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

Illustrator Scripting :: Deleting Used Symbol Generates Error

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

Illustrator Scripting :: Fill A Shape With Instances Of A Symbol?

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

Illustrator Scripting :: How To Break Symbol Link By Script

Sep 12, 2013

How to do it ?

View 4 Replies View Related

Illustrator Scripting :: Create Symbol From Layer PageItems

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

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

Edge Animate CC :: Change Image Source In Instance Symbol?

Feb 28, 2014

Well, I need a little slideshow of images, the code for mouse events (click, mouseover, mouseout, etc.) is the same for all images, then I create a symbol with one image inside for this, and drag&drop instances to stage, but now I don't know how change the image source of other symbols. In design time, when right click over any symbol instance only edit symbol it's possible (not single instance), and I don't know if is possible to change the image source of any symbol instance by code.

View 4 Replies View Related

Illustrator Scripting :: Adjust 9 Slice Scaling Guides Of Symbol By Script?

Sep 19, 2013

How to adjust 9 slice scaling guides of symbol by script?

View 1 Replies View Related

Illustrator Scripting :: Using Javascript And ScriptUI To Create A Form That Brings In Symbol From Library

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

Illustrator Scripting :: Symbol Is Within Rectangle Vector Area / Parent Child Relationship In HTML

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

Illustrator Scripting :: Changing Opacity Of Text?

Nov 25, 2013

I'm trying to change/access the opacity of a text object (Illustrator CC). In the documents, I found that it's represented by a text frame object, but it doesn't have opacity property. Text range and character attributes don't have it either, so I'm wondering: is there any way of accessing/altering the opacity of a text object using Javascript?

View 5 Replies View Related

Illustrator Scripting :: Changing Color Of A Selection To HEX

Sep 6, 2012

I'm new to illustrator scripting (but not to javascript or programming. I have an AI file that has multiple layers. each layer has several items that are supposed to be of same color. I have an array of HEX values.

I would like to loop over all items in a single layer, select them and change their color to some given HEX. Once that works, I will run on all HEX entries in array and save each variation in a separate PNG file.
 
For the first part i wrote some script (see below), but i do not see any change in the file after i run the script. No errors and no change. I run the script once i select all items in a specific layer.
 
My code:

function hexToRgb(hex) {
    var result = /^#?([a-fd]{2})([a-fd]{2})([a-fd]{2})$/i.exec(hex);
    return result ? {
        r: parseInt(result[1], 16),
        g: parseInt(result[2], 16),
        b: parseInt(result[3], 16)

[Code] ......

View 3 Replies View Related

Illustrator Scripting :: Changing Colors Multiple Files?

Feb 6, 2014

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.

View 4 Replies View Related

Illustrator Scripting :: Changing Text From Helvetica To Arial With JavaScript

Mar 11, 2013

I’m working with PDF files in illustrator and whenever the file uses Helvetica I have to change the font to Arial. This gets old when working with hundreds of illustrations. How I would go about changing all text that uses Helvetica bold to Arial bold and Helvetica Roman to Arial?
 
Would I loop through all the text frames and get the value of the font and use that value to change them or is there a more global way to go about this?

View 15 Replies View Related

Illustrator Scripting :: Changing Line Of Text In Multiple AI Files

Apr 5, 2013

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?

View 1 Replies View Related

Illustrator Scripting :: Changing Selected Text Color With JavaScript

Feb 25, 2013

I want to change my selected text to a different cmyk color using javascript. I have tried and I do not know what is missing or what I am doing wrong.
 
if ( app.documents.length > 0 ) {
newCMYKColor = new CMYKColor();
newCMYKColor.black = 0;

[Code]...

View 4 Replies View Related

Illustrator Scripting :: Changing Angle Of Linear Gradient Fill

Feb 4, 2013

Suppose I have an object filled with a linear gradient. This object is the only selected. I just would like to change the angle of the gradient to 25 degrees. So I think I could do:
 
var doc = app.activeDocument
alert(doc.selection[0].fillColor.angle) // the result is the exact angle of the gradient fill of the selected object. Suppose 12 degrees.
 
//now the try to change:
doc.selection[0].fillColor.angle = 25.0
 
No errors are found by the Extended Script Toolkit..BUT...it does not change anything. As Illustrator reference manual does not say this property is read only, I think I could write.

View 2 Replies View Related

AutoCad :: Changing Entity On Single Instance Of Defined Block

Jun 8, 2012

A defined block "DH" has:

A circle on layer CIR having a color of red...
A defined attribute on layer ATTR having a color of white...
The insertion point is the center of the circle...

Is it possible to change the circle to blue on one instance of the block without affecting the same change to other identical blocks in the drawing? Example:

Attachment 35286

View 2 Replies View Related

Illustrator :: Edit Text In Symbol Instances Without Breaking Link To Symbol

Sep 26, 2012

Is there a way to edit the text in a symbol instance without breaking the link to the symbol?
 
a really simplen example would be several instances of the same button graphic but with different labels.
 
I know these things are possible in Fireworks, but couldn't find a way to make it happen in Illustrator.

View 4 Replies View Related

Illustrator :: Add Symbol To User Defined Symbol Library

Aug 16, 2013

How do I add new symbol to an exsiting user defined symbol library? AI CS5.5, Mac.

View 2 Replies View Related

Illustrator :: Swap Brushes While Maintaining Stroke Profile

Aug 30, 2012

I routinely use stroke profiles to modify stokes that also have a brush appearance. When I change the brush, the profile is lost. The only way I found, to keep the stroke profile, is to save the profile before changing the brush appearance, then reasign the profile. I wonder if it is a programming oversight that deletes the profile from the stroke in this case.
 
I also would like to see a better method of saving/updating/editing stroke profiles. There is currently no way to overwrite a profile. Again, an oversite, in my opinion.
 
Stroke profiles should be available in a panel, similar to brushes. They are powerful effects, but poorly implemented.
 
I'm still working primarily, in CS5, but I think these features have remained the same in CS6.

View 1 Replies View Related

Illustrator :: Vectorizing Image For Instance Drawings (JPEG)

Mar 9, 2013

I was just wondering: what is the best way to vectorize for instance drawings you have on JPEG on the computer?
 
For example: I have an image of a circus poster with a beautiful clown on it. How can I vectorize it and modernize it?

View 1 Replies View Related

Illustrator Scripting :: How To Automate Importing Variable And Datasets Into Graphs Via Scripting

Dec 18, 2012

I'm try to automate the importing of the Varaible and datasets into my graphs via Scripting, but the ImportVaraibles() function doesn't seem to work.  Here is my Script, mostly copied from the example script provided with Illustrator (CS5).  And, this works manually, using the file names in the script, via Load Variable Library
 
    Set appRef = CreateObject(strIllistratorVersion)
   
       'Open the file and import the datasets
        Set docRef = appRef.Open(strTemplate & "200-500.ai")
        'docRef.Datasets.RemoveAll
        docRef.Variables("Yearbook").Delete
 
Here is the problem, after I delete the previous library, then this next line, right from the example, does nothing
The script then exits with 'No Datasets in this document'
       
docRef.ImportVariables (strXMLFolder & "Lumber_200-500.xml")
'appRef.DoJavaScript "alert('Template:" & strTemplate & strRange & ".ai  |  XML file:" & strXMLFolder & ""  & objFile.Name & "^')"
        If (appRef.Documents.Count > 0) Then
            Set docRef = appRef.Documents(1)

 [Code]....
 
If I remove that delete line, the script runs, but just uses whatever Variables I had last loaded, not the XML file.
 
It's simply not loading.  What do I need to do to get it to load?

View 8 Replies View Related

Illustrator Scripting :: Access Graph Data Through Scripting DOM?

May 6, 2012

Can you access graph data through the scripting DOM?

View 3 Replies View Related

Edge Animate CC :: Changing Element On A Copied Symbol

Nov 6, 2013

Currently, if you convert a rectangle (which contains elements, for example, a book title) into a Symbol, and copy that Symbol, you get the same elements (same book title).
 
I want to change that book title in the Copied Symbol, but any changes you make in the Copied Symbol, automatically changes the Original Symbol to the same. 
 
How can I make changes to Elements in Copied Symbols so it won't affect the Elements in the Original Symbol?

View 2 Replies View Related

Illustrator Scripting :: Create Mirror Text And Stroke Text In AI Scripting

Mar 16, 2013

the Script of creating mirror text and stroke text in Adobe illustrator scripting.

View 4 Replies View Related







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