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


ADVERTISEMENT

Illustrator Scripting :: Deleting Unused Swatches?

Jul 27, 2009

Because I'm unable to invoke the "Select All Unused" menu item of the Swatches panel menu I'm trying to attack it programmatically.
 
What I'm trying to determine is if it's sufficient to compare the Fill and Stroke Color of each Path Item (every path item of current document) or are there other items that should be examined to achieve the same results as the command in the Swatches panel menu? Page Items doesn't appear to contain a Fill Color property. I've got AppleScript code that appears to do the trick, but I'd like to get input so as to make sure I'm not missing something that my testing might not have uncovered.

View 11 Replies View Related

Illustrator Scripting :: Deleting And Replacing Layers?

May 1, 2013

So I'm trying to create a fairly simple script that will measure the size of art on the artboard for making printing plates. That part I have working. But once I have made one file, I have to delete the measurements layer manually (which is where the script puts them) so that I can make the next one. I need the script to check and see if there is a layer called "measurements" delete it and then create a new one called "measurements" in which to put the dimensions of the (new) artwork. This way I can keep making files and "saving as" with a new name.

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 :: 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 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

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 :: Deleting Text From Text Frame

Apr 8, 2013

What is the best way or anyway to remove text from a text frame? Say if you want to remove anything in () in a text frame or any * symbols.
 
52(one on both sides) //you have this in a text frame
 
52 // and you want to change it to this by deleting (.)
 
or
 
40* //you have this in a text frame
 
40 // and you want to change it to this by deleting the *

View 25 Replies View Related

Illustrator :: Save For Web Generates A New Images Folder?

Jun 18, 2013

Is there a way to shut off the automated new "images" folder Illustrator generates when Saving for Web with slices? I have image folders inside image folders inside image folders. I can't seem to find a preference to turn this feature off. I am using Illustrator CC on a Mac running OS 10.8.4

View 5 Replies View Related

Illustrator Scripting :: Getting Error 1302 - No Such Element Line

Oct 5, 2012

I am getting an error with a script i have used before without any problems.The script updates the only image at the bottom of a single page PDF and saves the changed PDF in another folder.
 
It asks me to locate the folder of PDFs to be modified.It asks me to locate the folder where the modified PDFs will be saved.It asks me to select the new image that will be used.It will then update the image and resizes it and save the PDF in the specified folder.
 
I don't get this error on all PDFs but i get it at least once every 10 PDFs  (and there are over a 1,000 PDFs).The error i get is this:
 
Error 1302:No such elementLine:27->      rip=doc.rasterItems[0].position;
 
I get this error regardless of whether the script is run in CS3 or CS5.

Additional info.I ran this script in CS3 and it worked. At a later date i ran another script on the folder of modified PDFs in CS5 that deleted any unnessesary elements outside the artboard, it selected All on the Artboard - then inversed the selection - and deleted any selected items followed by save and close.I have tried making sure the "new" image has the same name as the image being replaced but this made no difference.I am using Illustrator on Vista.
 
The script is below:
 
#target illustrator
function replaceImage() {

[code]....

View 4 Replies View Related

AutoCAD Inventor :: Shared Sketch Generates Sketch Doctor Error - Feature Suppressed

Sep 21, 2011

I've created a shared sketch and have used it with various features. Sometime those features are suppressed. The model works fine but the shared sketch generates a sketch doctor error because the feature that created it has been suppressed. Is there anyway to make the sketch suppressed so it doesn't trigger a sketch doctor error? Inventor 2013

View 2 Replies View Related

Edge Animate CC :: Deleting And Creating Symbol Instances?

May 3, 2013

I'll start off by saying that my knowledge of webcode is not the best, but I am learning as I go.
 
I am working on a project that uses "if then" statments. For example
 
sym.setVariable("test","0");
if (test = 0) {// Code }
else { / /Other code }
 
Now the "if then" statment works fine however my problem is the code that I am able to put into one of the two options seems limited. I'm not sure if I have it set up wrong or what, but I need to be able to delete and create instances of symbols/elements depending on the variable "test".
 
So for example if "test" equals 0 I want to delete symbol "update" so my code is...
 
sym.setVariable("test","0");
if (test = 0) {sym.getSymbol("update").deleteSymbol();}
else {}
 
However this code doesn't work??? If I just use
 
sym.getSymbol("update").deleteSymbol();
 
then the code works fine. But when I put it in the if than statment it fails to excute? I can put other code in the if than statment, such as alert(test); and I get the proper alerts ect.... So I don't believe it is the statment itself. But I could be wrong.

View 3 Replies View Related

Illustrator Scripting :: Block Specific Error Message In JavaScript?

Mar 5, 2012

Is it possible to block this message with javascript?
 
I've already tried the following:
 
app.userInteractionLevel = UserInteractionLevel.DONTDISPLAYALERTS;
 
This won't work.

View 3 Replies View Related

Illustrator Scripting :: CS6 PlacedItems Relink Method - Sometimes Producing Error

Mar 21, 2014

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]....       

View 2 Replies View Related

Illustrator Scripting :: Restart Through Script (or Eliminate PARM Error)

Aug 10, 2012

I'm working on a javascript that goes through a folder, rasterizes the paths inside each file, and saves the results as separate files in another folder. My script works fine on individual files as well as for several simple files. However, once it gets going on some of the big ones, it starts to give me PARM errors.
 
Illustrator CS5.1Windows XP, SP3 (work computer)JavascriptThe CAD export that created the pdf and eps files broke any curves into tons of tiny straight lines. As a result, these drawings can have 15-35 thousand paths per image. 

Get the source and destination directoriesOpen a file from the source directoryGo to the first layer of the fileLoop through all text items to move them to their own layerLoop through all path and compound paths to move them to a groupRasterize the group of path itemsRepeat for the next layer and so onSave the file to the destination directoryRepeat the process for the next file and so on.The scripting guide suggests it could be from conflicting functions or global variables overwriting each other. However, my script is now entirely contained within its own function, and all variables are declared locally. Running from a clean illustrator and ESTK startup, it will still produce a PARM error after a few large files.
 
The guide also suggests having the script quit and re-launch Illustrator after working on many files. Since I assume these huge diagrams are probably several "normal" files' worth of objects each, I figured it probably just needs to restart Illustrator after x amount of stuff goes through. So I look in the guide's section on launching Illustrator through javascript. That basically says "Why would you ever need to do that?" I tried looking it up in the tools guide, but that document isn't very clear at all.
 
1. What would I have to do so Illustrator doesn't throw a PARM error on the line marked below? (besides just putting it in a try/catch and pretending it didn't happen) It doesn't consistently happen on the same file or even at the same point in the file, but always at that line.
 
This is just a tiny part of the script. objectClass is a placeholder for PathItems, CompoundPathItems, etc. Looping backwards and setting the group to null at the end were just experiments, neither of which had any effect on the error.
 
if(objectClass.length > 0){
    var objectGroup = myLayer.groupItems.add();
    for(var i = objectClass.length; i > 0; i--){
        objectClass[i-1].move(objectGroup, ElementPlacement.PLACEATBEGINNING); //This one keeps breaking stuff.
    }
    sourceDoc.rasterize(objectGroup, rastBounds, rastOptions);
    objectGroup = null;
}
 
2. Failing that, how can I relaunch Illustrator through javascript? Or a limited amount of VBScript, though my knowledge of that is limited too.

View 16 Replies View Related

Illustrator Scripting :: Why Does Trace Script Give Application Error

Jul 24, 2013

I have written a simple script to to trace a raster image using Illustrator.The image can be traced using >Object > Image trace in Illustrator without any problems.However, when I run my script I get the following error:  Application error 12321(some long number) 'MARC'.
 
var jpgFilePath = new File ("/Users/Ellipse8.jpg" 
createRasterItem(jpgFilePath)
function createRasterItem(jpgFilePath) {
var rasterFile = File(jpgFilePath);
var myDoc = app.documents.add();
[code]....

View 2 Replies View Related

Illustrator Scripting :: Open Multiple AI Files Produce Error In Palette (8702 - No Document)

Aug 12, 2013

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

[Code] ....

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 :: Mapping Symbol On 3D Object Causes Error While Processing Appearance Of Object

Oct 6, 2012

I have simple a 3D bottle shape created from about 16 points and I am trying to map a gif image on to it usning CS5.  No matter what I have done (work from a new document, etc.) I always get the error message. I also receive this error when I attempt to map a jpg image on to the same shape.  I have attempted this on three different Windows 7 machines running CS5 with the same result.  When I try it with CS6 the program closes with a catastrophic error and no message. I do not receive this error using the default symbols.  The gif and jpg images are imported and imbedded into the document and then moved to the symbols library. 

View 6 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 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

Lightroom :: Error Deleting Files From External Drive In 5?

Jun 12, 2013

I am getting "trash is not supported on this volume" errors when trying to delete rejected photos from two different firewire volumes on OS X 10.8.4.
 
This is not an issue with internal hard drives and is not an issue in LR4.4 on the same external drives.

View 1 Replies View Related







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