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

Script for Copy and Paste Object from one Ai file to another Ai file.

New Here ,
Feb 10, 2016 Feb 10, 2016

Is it possible to create script that will take object (Text and Images) form one and AI file and placed them into another AI file in specific layer and location?

When I do it manually:

#1 - Create Banner Design (Text and Images)

# 2 - Outline the text and group it with images to make it one object.

# 3 - Copy the group object

# 4 - Open another Ai file

# 5 - Paste it into specific layer and adjust location

We do this to individually customize documents and it is very time consuming.

Feel free to contact me directly, we will consider to hire programer to help us.

TOPICS
Scripting
7.6K
Translate
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
Adobe
Contributor ,
Jul 03, 2016 Jul 03, 2016

Here is the small script to do copy paste : Before executing this script ensure that object must be selected that need to be copied

app.executeMenuCommand('copy');

var newDoc = app.documents.add();

newDoc.activate();

app.executeMenuCommand('paste');

Translate
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
Participant ,
Feb 07, 2017 Feb 07, 2017

Where is all that information ?

I cannot find it in the "ADOBE ILLUSTRATOR CC 2017 SCRIPTING REFERENCE: JAVASCRIPT"-Manual.

Is there also a Method for 'paste in place' and 'select all' ?

Edit:

Sorry, I guess I found the answer here [JS] CS6+ executeMenuCommand

Translate
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
Guide ,
Mar 30, 2017 Mar 30, 2017
LATEST

I love executeMenuCommand.

but here you can just use:

app.copy();

app.paste();

Translate
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
Participant ,
Aug 09, 2016 Aug 09, 2016

Also look into the textFrame function createOutline();

Translate
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