• Global community
    • Language:
      • Deutsch
      • English
      • EspaƱol
      • FranƧais
      • PortuguĆŖs
  • ę—„ęœ¬čŖžć‚³ćƒŸćƒ„ćƒ‹ćƒ†ć‚£
    Dedicated community for Japanese speakers
  • ķ•œźµ­ ģ»¤ė®¤ė‹ˆķ‹°
    Dedicated community for Korean speakers
Exit
0

Paste a Vector Smart Object into Photoshop

Community Beginner ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

I was wondering if anyone knew of a way to paste a vector smart object from illustrator into photoshop without the dialog box coming up that has you accept the size/placement of the object.

I am able to do this using the code the scriptlistener plugin spits out but not without it. Unfortunately I'm running into a few problems with using the code the scriptlistener spits out so I was just wondering if anyone knew of a way to do it without that.

Thanks!

TOPICS
Actions and scripting

Views

1.4K

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

Valorous Hero , May 10, 2013 May 10, 2013

The only other way I can think of is to use...

app.activeDocument.paste();

Then call an external program to send an enter to Photoshop.

Votes

Translate

Translate
Adobe
Valorous Hero ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

This is the best I could come up with...

pasteSO();

function pasteSO() {

var desc3 = new ActionDescriptor();

desc3.putBoolean( charIDToTypeID('AntA'), true );

desc3.putClass( charIDToTypeID('As  '), stringIDToTypeID('smartObject') );

desc3.putEnumerated( charIDToTypeID('FTcs'), charIDToTypeID('QCSt'), charIDToTypeID('Qcsa') );

var desc4 = new ActionDescriptor();

desc4.putUnitDouble( charIDToTypeID('Hrzn'), charIDToTypeID('#Pxl'), 0.000000 );

desc4.putUnitDouble( charIDToTypeID('Vrtc'), charIDToTypeID('#Pxl'), 0.000000 );

desc3.putObject( charIDToTypeID('Ofst'), charIDToTypeID('Ofst'), desc4 );

try{

executeAction( charIDToTypeID('past'), desc3, DialogModes.NO );

}catch(e){}

};

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 Beginner ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

I'm actually currently doing something similar - that looks like what the scriptlistenr spits out (more or less). I think I'm just going to have to find a different work around.


Thanks for your help.

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 ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

When you got the code from scriptlistener did you change the DialogModes from ALL to NO as Paul did? What about Paul's code doesn't work for you?

What type of vector are you pasting? From AI? Would placing as a smart object for the file instead of using the clipboard fit in your workflow?

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 Beginner ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

Hi Michael -

As I stated above I can get the code to work how I need it to using the script listener code. What Paul wrote is basically exactly what I am currently doing. Both what I am doing and what Paul posted both work fine to paste an Illustrator Smart Object into Photoshop.

What I was asking was for a way to do it without using the ScriptListener code. It seems like none exists, which is fine, I was simply wondering if anyone else had found one as it would make my code less cumbersome.

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 ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

Using the regular DOM you can choose to open a document in a smart object wrapperā€¦ but I guess you then have to duplicate to another documentā€¦ A less cumbersome method than scriptlistener I think notā€¦

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 ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

zarprey wrote:

ā€¦ Both what I am doing and what Paul posted both work fine to paste an Illustrator Smart Object into Photoshop.

What I was asking was for a way to do it without using the ScriptListener code. It seems like none exists, which is fine, I was simply wondering if anyone else had found one as it would make my code less cumbersome.

What exactly do you really want to paste from where to where?

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
Valorous Hero ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

The only other way I can think of is to use...

app.activeDocument.paste();

Then call an external program to send an enter to Photoshop.

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 Beginner ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

I think you're right. Probably not worth it in this case to spawn another program.

Thanks for your help.

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 ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

Paul, I think PS behavior is use what ever vector paste option the user called lastā€¦ Enter is just going to accept that whatever. So no guarantee of Smart Object. I don't see your function as cumbersome at all and would be the way I would do thisā€¦ I know of nothing shorter nor sweeterā€¦

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 ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

Mark, I think because Paul's code has the line

desc3.putClass( charIDToTypeID('As  '), stringIDToTypeID('smartObject') );

it will paste as a smart object regardless of the last user setting. At least it does for me.

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 ,
May 10, 2013 May 10, 2013

Copy link to clipboard

Copied

LATEST

Mike I agree, this was my pointā€¦ DOM's app.activeDocument.paste(); will use the last user option if no dialogs are displayed during the scriptā€¦? Paul's scriptlistener negates this and will always result in smart objectā€¦ Thats why I think its the best and shortest optionā€¦

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