Illustrator Scripting :: Paste In Place Across Layers Script
Jun 1, 2012
I'm looking for a script to paste an object (paste in place) on top of all other layers in a file.
I know I can position a single object on the top layer and then turn the bottom layers on and off, but for my needs (and in this situation) I need to actually paste that object onto each layer.
View 1 Replies
ADVERTISEMENT
Jun 8, 2012
I cut and paste in place from a layer to an other and its not in the right place. it seems new since CS6
I have multiple artworks on my file but i could do it since then. do you now how to not talke care of it ?
View 8 Replies
View Related
May 15, 2012
Carlos, you created a script i believe called AI_openMultiPagePDF.However i was wondering if you could change it just a bit and instead of opening the files, could you use the PLACE command instead?
The problem i have had is that some PDF's have embedde fonts that i dont have but if i place it, then flatten transparency>Convert Outlines i can use the PDF excatly as it was and not have it convert the fonts.
Is that an easy script change?
#target illustrator
#targetengine session
// script.name = AI_openMultiPagePDF_CS4_CS5_v1.02.jsx;
// script.description = opens a multipage PDF;
// script.required = requires CS4 or later
// script.parent = CarlosCanto // 01/07/12; v1.2-01/15/12
// script.elegant = false;
I didn't try opening a ridiculous amount of pages, I "only" open 35 pages....in about a minute and a half. Use with caution, save everything before running, script is memory intensive...
// Lion fix by John Hawkinson 01/15/12
START UI CODE, create user interface
var win = new Window ("dialog", "MTools - Open Multipage PDF");
[code]....
View 12 Replies
View Related
Aug 22, 2013
I am having trouble with the Paste in Front/Back function. I will copy my selected layers and then want to paste them in place on the selected artboard next to it and often times it pastes it back on the artboard where it copies from. Sometimes the function does what I want, but often times it pastes in a different location, either on the same artboard, or next to the artboard where I want it pasted. It also tends to slightly move the X and Y values (again, sometimes). Each time I go to paste, I am creating a new layer and selecting the artboard where I want everything pasted, but sometimes it works, and other times it doesn't. I am using CS5 on MacBook Pro.
View 8 Replies
View Related
Apr 15, 2012
This is my very first attempt at a script:
* this script will prompt the user for a file name and location and then save the current file as a .pdf with secure save options*/
var curDoc = app.activeDocument;
var destName = prompt ("Enter a Filename Daniel", "", "Save With Security");
var destFolder = Folder.selectDialog('Select which folder to save to :');
saveFileToPDF(destFolder+ '/' + destName); // not sure if i need this here ?
[Code] .......
i can do the math of (artboard width)-(text width) / 2 is start point of text but how do i find out the text width and the artboard width?
View 11 Replies
View Related
Jan 1, 2014
I recently created a script that reads the layer names of an Illustrator file, and uses the name to identify a swatch to use to pattern all elements on that specified layer. The script works well, and is a real time saver for our mapping staff, but it requires duplicate swatches to exist, where the only difference is their colour.
To improve the script I want to duplicate a swatch and modify its' colour before applying it to a specific layer. I think the only way this can be done is via the "placedItems" command. So the code I'm trying to write looks likke this:
for(var s=0; s<slib.length; s++){ // search swatch library
var pat=slib[s].name; // get swatch name
[Code]...
However I'm struggling to find the correct syntax to make this work.
View 2 Replies
View Related
Nov 12, 2013
I have a script that measures the repeat interval and gap between print impressions printed using a print cylinder (for the production team to know which print cylinders to use, and what to expect once it prints, when looking at the proof sheet). Basically it just measures the distance from the beginning of one print impression to the beginning of the next (these are printed with a cylinder, so every time the cylinder rotates a new print impression happens) as well as the distance in between prints. That part works great.
In order to get these meaurements, Illustrator is measuring the distance from a zero point on the artboard to the left side of a marker I made called "repeat", and it is assigned a variable called rawRepeat. What I'd like to do is have the script take that rawRepeat value and use it to move a copy of the print impression to the right by exactly that variable amount and paste it beneath the marker called "repeat". I have been doing this part manually, but haven't been able to figure out how to get illustrator to do this for me.
Here's the script I am using:
var myDocument = app.activeDocument;
var selectedObject = myDocument.selection;
var activeLayer = app.activeDocument.activeLayer;
var layerName = activeLayer.name;
activeLayer.name = "plate";
[Code] .....
View 11 Replies
View Related
Mar 20, 2012
trying to have an applescript place a PDF as an Illustrator Link at the PDF's Media Box using "make new placed item". The only result possible as far as I can tell is a link at the PDF's Art Box.
I've seached around and have seen others with the same issue, but no answers as to whether it is actually possible. As with most Applescript stuff, I am either way overthinking it or it is not possible directly.
Currently I have a workaround using an Applescript script controlling Acrobat to sidestep the problem by setting the Art and Crop box to Media box, then place as a link in Illustrator, but it is not a direct route into illustrator.
I have also noticed that in the "Adobe Illustrator CS5 Scripting Reference" that the "PDF options object properties" do not honor the PDF crop bounds (except for the default value of Media Box). Is this an inherent problem with Applescript/Illustrator and PDF crop boxes? Could it be that the options for Open PDF and Place PDF are crossed?
View 7 Replies
View Related
Jul 26, 2013
I have been working on a script to place a psd file onto only one visible layer (document has multiple hidden layers). This java code has worked so far:
var doc = app.activeDocument;
var onFile = File("C:/Users/Desktop/Desktop/ExportedArtboard-01.psd");
var mydoc = doc.placedItems.add();
mydoc.file = onFile;
mydoc.embed();
however this works with only the top layer visible (eye turned on in Ai). if top most layer isn't visible i get "target layer cannot be modified" error.
For instance say i have 1,2,3 layers. layer 1 (top most) and 3 (bottom most) would be hidden, layer 2 (middle layer) would be visible and then running the script would place the psd file on to layer 2.
View 3 Replies
View Related
Sep 20, 2012
how can I copy and paste position and size of two objects?
Let's say I have a circle 2 x 2 cm and it's position is y 5cm x 5cm, I have a square of size 3 x 7 cm and it's position is y 0cm x 0cm.
How do I copy and paste in a single command/step the circles position and size to square, so I can get square of 2 x 2 cm and it's position 5cm x 5cm?
Something like copy + paste in place with a different logics. I hope You understand what I want.
I'm doing it now manually, I'm copying size and position of one object to another [ctrl + c > ctrl + v] but it takes quiet a while,
View 2 Replies
View Related
Jul 23, 2013
How can I select all objects in a layer and copy and paste the objects into a new document? We are having issues with the copy and paste method. Is this because it uses the operating systems clipboard?
View 10 Replies
View Related
Sep 21, 2011
Is there a way with JavaScript to place an image with a calculated path and file name? I have 30+ artboards per document, each artboard named by product number. The actual file name of the master AI file is also already established (meaning every document I use this new script on will have already been saved).
Here's the scenario I'm hoping to create in the context of the documents mentioned above:
Run a script to "Place" a linked image based on the following calculated path:
["S:SAPCurrent Images in SAPStock Schools"] + [current ai filename minus the .ai extension]+[a hyphen like this "-"]+[currently selected artboard name]+[".jpg"]
This image link can be placed on a new top layer called "Images" or if necessary on the currently selected layer. Dimensions of the placed image should be a pre-determined size 8"x8".
Error if the ai document has not been saved yet.
View 11 Replies
View Related
Apr 2, 2013
Is it possible to copy a specific area (Artboard area) and paste it to new document by using JSX.
View 1 Replies
View Related
Sep 18, 2013
Could it be possible like the way in Indesign, placing the PSD file and able to select different layers of PSD files?
View 1 Replies
View Related
Jan 4, 2014
when I import files from Illustrator, and import them as footage to preserve the layers, I get an object for every layer. However, when I move those layers into my comp, they are either moved by default into the center or wherever I drop them. How would I move them into the comp while preserving the position of the layers in my actual ai file?
View 2 Replies
View Related
Apr 7, 2012
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.
View 7 Replies
View Related
Feb 13, 2013
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]....
View 8 Replies
View Related
Jan 10, 2013
I am working on a project and when I try to copy and paste unlocked layers to paste them in to another image it doesn't paste. The only thing it pastes is the text unformatted. I tried resetting the settings by removing the setting file to see if I can set Illustrator back to square one and it isn't working. See Picture for before (copy) and After (paste)
[URL]
I am also using windows 8 on a pc. I would say it was the OS but it was working fine untill yesterday.
View 30 Replies
View Related
May 9, 2013
Is there a script that can create layers with csv file?
View 5 Replies
View Related
Jun 30, 2013
script that is able to do the same as this photoshop one [URL] ...., I would use that one in photoshop but its not working in CS6.
find a script that will seperate the text into layers ready for export to After Effects to be used in Kinetic Typography pieces.
View 3 Replies
View Related
Feb 18, 2013
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.
View 6 Replies
View Related
Mar 4, 2013
Whenever I open a file, Layers are randomly expanded in the Layers palette.
Is there a way to run a script that collapses and/or expands all layers?
View 3 Replies
View Related
Feb 6, 2014
make a script for layers to pdf?
ADHESIVE, WHITE, Layer-8, Layer-7, Layer-6, Layer-5, Layer-4, Layer-3, Layer-2 and Layer-1 needs to be on seperate pages.
Jobbnr and Passmerk / Registrationm. (incl. sub-layers) needs to be on all pages!!
HJELPELINJER, COLOR, CARRIER, Guides and Field Background don`t need a page.
Is it possible to make such a script?
View 1 Replies
View Related
Apr 26, 2012
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];
[Code]....
View 6 Replies
View Related
Jan 24, 2013
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.
View 3 Replies
View Related
Jul 6, 2013
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.
View 1 Replies
View Related
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
Feb 13, 2014
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.
View 6 Replies
View Related
May 14, 2012
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.
View 2 Replies
View Related
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
Apr 5, 2012
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?
View 8 Replies
View Related