• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Copy artboard (and art) to another document

Explorer ,
Jan 25, 2012 Jan 25, 2012

Copy link to clipboard

Copied

Is there a way to write a script to copy a selected/chosen artboard (and it's contents) to another opened document, placing it in exactly the same place on the global x/y coordinates?  I'm either unable to find this feature built in to Illustrator, or it's simply missing.  Any help is greatly appreciated.

Thanks!

Tim

TOPICS
Scripting

Views

74.9K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Feb 07, 2012 Feb 07, 2012

Hi Tim, here you go, open both your template and your destination document and run the script

#target illustrator

// script.name = timLCdupArtboards.jsx;

// script.description = duplicates provided artboards to another open document;

// script.required = requires CS5, and both source and destination documenets (with the same layer structure) open

// script.parent = CarlosCanto // 02/07/12; 

// script.elegant = false;

// Notes: use only in documents with NO sublayers,

var docList = doclist(); // get a

...

Votes

Translate

Translate
Adobe
Community Expert ,
Jan 25, 2012 Jan 25, 2012

Copy link to clipboard

Copied

there's no one command to do that. You'll have to get the size/placement of the artboard and recreate in the destination document. Then is a matter of looping thru all pageItems and duplicate them to the new artboard.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 25, 2012 Jan 25, 2012

Copy link to clipboard

Copied

So basically it would have to be a separate script for each artboard we’ want to copy, right? If that’s the case that wouldn’t save us much/if any efficiency. Was worth a shot, and can’t hurt to ask J

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2012 Jan 25, 2012

Copy link to clipboard

Copied

if you need to replicate all the artboards, you could loop thru all of them. If you need only certain artboards you could either ask (which ones, that would be the easy way) thru scripting or select some pieces live in each of the artboards and add logic to find out the artboards indexes.

what version are you using? in CS5 there's a function to select all objects in a given artboard

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 25, 2012 Jan 25, 2012

Copy link to clipboard

Copied

Yes, I’m using CS5. It would be a case of only needing to pick and choose which artboards to copy as needed from the original template onto an existing document. The nice thing is, the documents and all of their artboards (or vacancies) are all in the same location (on all of the documents), so if I can get a script it would ideally seat the copied artboards/artwork into the same vacant location. In other words, all of our documents started from the same template…and we now have hundreds of files from this original template. We have now had a need to add a few artboards to the original template. Now that we’ve added them to the template, we must go back and add only the new artboards (to the same vacant location) on all of the other hundreds of files. Trying to explain it clearly, but I’m not sure, am I making sense?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 25, 2012 Jan 25, 2012

Copy link to clipboard

Copied

it does make sense, are you writing the script?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 25, 2012 Jan 25, 2012

Copy link to clipboard

Copied

I wish. Unfortunately, I would probably need some pretty detailed guidance to pull it off by myself.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 26, 2012 Jan 26, 2012

Copy link to clipboard

Copied

I'll give it a try....

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

Thanks Carlos.  Do you need any more info?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

Hi Tim, I haven't had a chance to work on you project...one question...what is the more complex layer structure you would potentially have. I mean how deep would your layers within layers within layers go?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

There are just three layers of depth in these files. “Template”, “Approvals”, and “Art”. The “Approvals” and “Template” layers will be locked (but should be copied/duplicated onto the other document that has the exact same layer structure/names/locked status.)

Does that answer what you’re needing to know? Let me know if you need something else.

Thanks,

Tim

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

no sub-layers?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

There are no layers that I created as “sub-layers”. I think I’m a little new to the “sub-layer” terminology. There are objects and object “groups” that exist within the “Template” and approval layers, but none that were created as “sub-layers” containing multiple sets of object groups etc. Am I making sense or do you need to see an example?

Thanks,

Tim

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

Let me just say that “Actions” in Illustrator CS5 are worthless. Even trying to create a manual “action” to do this is proving impossible because of the limitations of this feature. It doesn’t record 50% of the actions a user takes. Can’t even record the steps to create a new artboard. Very frustrating (again) as I try to get something done using actions in illustrator..

Sorry for the vent, but all that to say, I am grateful for your help with scripting this. Let me know if you need any other info from me.

Thanks,

Tim

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

Tim, You will NOT be able to do any of this with actions ( well so I think )… Further more I think script could do this ( but there would be serveral limitations )…

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

I'm ok with some limitations, but if there's a way do automate/speed up any portion of this...even if have to run 2 scripts...it would be a great help. We have a ton of artboards/documents that we are working with.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

Something that springs to mind straight away… This could become a RPITA both your artboards and there relative artwork must be separate… AI lets you do artboards in formatted rows etc. or completly random and art can exist across multi-artboards… I would hop you are dealing with the first of these?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

that was my main concern, it could get real messy, but if all docs are based on the same template that part would be covered. The other issue would be nested layers, now it seems there's only main layers, it's getting less complicated...

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

There are very limited opions when working with artboards… Using the select method and using app.copy() app.paste() may be one route… I don't know if 'paste remember layers' is a writable boolean in the pref's or you could just ask the user opts for this before running…? Not tried it myself so it would need testing… I try NOT to use the clipboard where ever possible… Anyhows I don't think it's a 15 minute re-hash of some code I already have…

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

yeah, copy/paste is a headache, I was thinking selecting all on a given artboard, then duplicate each item in selection to the destination document. That's the process I did with the "open multipage pfd" script, but you're right, it is not a 15 minute thing.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Jan 30, 2012 Jan 30, 2012

Copy link to clipboard

Copied

Carlos, I had on my to do list a PDF page importer ( been there a little while )… Not had the oportunity to look at your script yet ( but I will )… I have several issues with AI and it's artboards Im glad I missed CS4 where they were just plain $h1t at least they put some sugar on it in CS5 but they still smell and taste like…

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 31, 2012 Jan 31, 2012

Copy link to clipboard

Copied

Do you guys need to see a sample file?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 31, 2012 Jan 31, 2012

Copy link to clipboard

Copied

it wouldn't hurt to have one, post it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 01, 2012 Feb 01, 2012

Copy link to clipboard

Copied

I will send a PM to you and Mark.  Some of the artwork is proprietary (licensed marks) so I can't just post the files online.

Thanks,

Tim

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 01, 2012 Feb 01, 2012

Copy link to clipboard

Copied

Carlos - PM me the email address to send the sample files (template and destination file) to. 

Thanks so much!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines