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.
I have an Illustrator document with one layer (named Layer 1).In that layer are lines, rectangles and text.Is it possible (in script) to: make 3 additional layers named NL, EN and GEselect and cut all the text in Layer 1paste that text in the same place in the layers NL, EN and GE
(Step 2: select all text items and Ctrl-X) (Step 3: select proper layer and Paste in Place in that layer)
I know this can be done with an action (I did that allready) but the reason I want to script this is because I have to combine this with another script which takes care of colorizing stuff.
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.
I can't figure out the proper commands to fill out and complete the script below. What I am trying to do is:
- Create a new document using one of the Profile presets (or have the New Document dialogue open so I could select the profile, size and bleed) - Make 3 layers, each with a diferent name - Create a rectangle the size of the artboard on the bottom layer, with a swatch stroke and no fill - Create a rectangle the size of the bleed on the middle layer, with no stroke or fill
Like I said, I haven't gotten far at all. I've read through the basic scripting guides and I'm just not understanding all of the language needed to string things together.
tell application "Adobe Illustrator" make new document set topLayer to make new layer ¬ at beginning of document 1 with properties {name:"Vector"} set bottomLayer to make new layer ¬ at end of document 1 with properties {name:"Through Cut"} end tell
I have written a small application in .NET that gives color to Illustrator files.I have a layer with 100 color items (paths with a fillcolor). Each one has a unique name. Through that name my program looks them up, takes the fill color and applies that color to another path.Recently there was a change in Design, the drawings that I had to provide of a Fillcolor were no no longer pathitems but rasteritems (imported from photoshop). I thought ok no problem instead of setting the Fillcolor property I'll use the Colorize method on the rasteritems. It worked fine but now and then I came across a situation where raster-item didn't get the color. After digging in to it I saw that it was because some colors are Pantone colors and the colorize method on rasteritems only takes RGBColor or CMYKcolor objects. How to do it with the pantone colors?
I would like to automate an action set that selects a raster image (linked file) that has been grouped with vector art and then converts that selected raster image into a vector (live trace)
I'm using cs5 on a mac. As far as format goes I have hundreds of eps files that all have at least one raster bitmap tif which was imported as a linked file and then grouped with vector art. So I will like to run a batch script command that will select only that bitmap raster image (because I want to maintain the present vector art in the file) and convert that bitmap tif to vector- and save the file which will hopfully be in vector format.
I've been using Illustrator since the late 80's but this request just now came up for the first time, twice in one day: the clients each want me to send them layered files (OK-no problem) wherein all the layers, even the raster layers, register as vector layers. Or at least all the layers, regardless of file-type (vector or raster) are contained within an unflattened Illustrator file. One of the clients specifically asked that the Type layer (No problem-all the type is on one layer) be "vector mapped", whatever that means, while all the other layers can be Photoshop layers, if necessary. So how do I hand them an open, unflattened Illustrator file containing both vector art and raster art? Can it be done in Acrobat, as a PDF? I'm working in AI and PS CS5, but I can and will upgrade if I have to.
I´m aware that Illustrator doesn´t have multiple artboards options for JPG as it does with eps, or other formats, but is there any workaround for this? Looping current artboard and exporting them to JPG or something. Or maybe there is someway to force the "save multiple artboards:true" in JPG?
export document currentDoc to file exportFolder as JPEG with options ¬ {class:JPEG export options ¬ , quality:100 ¬ , artboard clipping:true ¬ , artboard range:1 - 2 ¬ , save multiple artboards:true}
Imagine a layer containing 10 squares, each square is isolated (none are touching). I need a quick way to put each of those squares on its own layer. Is there something already built in, or any plugin or action?
I'm trying to write a script that renames a layer, and group within the layer, then an object within the layer (but not a part of the group) and have it run in a loop.
Here's what I've got so far, the group rename doesn't work.
#target Illustrator var doc = app.activeDocument; idLayers(doc)//IRename layers idGroups(doc)//Rename groups function idLayers(doc){
[code]....
I haven't put in anthing to rename the single object yet since I cant even get the group rename to work. I suspect that the group re-name section isn't working because I'm either using bad syntax or an invalid command.
Is it possible to reference layers or groups by their names instead of their index using VBA? If so, what is the sytax? I know you can do it in Extendscript, but I'm not finding info for VBA.
I am trying to export layers to SVG, but I need to access the "Use Artboards" option in my ExportType.SVG options. I do not see it in the Javascript reference: [URL]....
I'm going to connect my AI file to After effect. So I had to create lots of layers in order to edit them seperatly in After effects. But it seems like my amount of layers are too large because AE always crashes (not responding -> Force quit)
So I wanna break some stuff down in multiple AI files, but I don't wanna go and select every layer and delete it. That would take too much time. Is there a way to select the multiple objects in Illustrator and delete that but also its layer its in?
I'm trying to create a script via javascript for Illustrator.
My problem is : I have a AI file with multiple layers, i want to create one artboard per layer, in order to export a multipage PDF ( each page contain 1 layer ).
The layers represents the differents type of print ( vernish, color, hot gold, pressure ... ) and/or color type ( Pantone, CMYK, cut, kisscut ... ). My client want a PDF for see each type of print or color type per page.
I'm trying 2 ways :
1st solution : Create new artboards, and duplicate ( or move ) layers content on the new artboad, but the function move/duplicate don't work to move content on another artboard.
2nd solution : Create new document with the same number of layers as artboard and duplicate layer to the new artboard on the new document.
is there a way that I can loop through all layers and sublayers looking for a name of a layer? I have one that loops through only top level layers. I am thinking I have to somehow incorperate all pathItems, groupItems and the like to incorperate all types of "layers" there might be, since a group is technically not a layer but a groupItem.
this is what I am doing so far:
for (var i = 0; i < numberOfLayers; i++) { var customName = "div structure"; var myLayer = app.activeDocument.layers[i];
I am trying to add a prototype to the Layers object so I can do something like try{ .getByName(name) catch{ return null. For when the named layer doesn't exist. (It gives an error for me in CS5). So unfortunately me trying to go Layers.prototype. my method doesn't seem to work at all.
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.
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.
I am looking for a script that will look through all the layers in my file and if there are no objects on the layer I would like it to delete them.how to remove a layer with a script, just not how to identify a layer or many layers that may no have objects on them.
How I can place all my symbols at one time in the File and on there on layers? is this possible?
The only dialog box i could find is in the corner of the symbols palette is "Place symbol"... I tried to create an action but it wont go to the next symbol.
how to apply multiple strokes to a path with JavaScript? Assigning strokes width, caps, position in stack (my particular concern)? All i can do at the moment is to apply a single stroke.
I have a layer that contains two clipping groups (groups with a clip mask and other art). When I call layer.groupItems it returns an empty array. When I call layer.layers it returns the two clipping groups. I need to know if these layers are clipping groups, but if they are coming back as layers how can I figure that out?