Copy link to clipboard
Copied
Hi.
I get some object to other design company.
There is AI file in URL(illustrator CS3 version file)
http://www1.datafilehost.com/d/f873f882
it's looks like 'Feather effect'. but it's not.
it's not possible to copy to below Script code.
Sel.duplicate(newGroup, ElementPlacement.PLACEATEND);
So i started wonder about it.
How can i make this object?
and, How can i copy this object to script code?
Thanks you.
Copy link to clipboard
Copied
It seems to be a picture.
Select the object.
Now you can copy the selected object:
var Sel = app.selection
Sel[0].duplicate(app.activeLayer, ElementPlacement.PLACEATEND);
This works for me with your file in AI (CS3)
Therefore, this also works:
var aDoc = app.activeDocument;
var Sel = aDoc.selection;
var aLayer = aDoc.layers.add();
var newGroup = aLayer.groupItems.add();
Sel[0].duplicate(newGroup, ElementPlacement.PLACEATEND);
Copy link to clipboard
Copied
ohh.. thank you for your reply. But, I found another problem.
Copy is not problem. Real problem is 'translate'.
I want copy and translate to right side.
my source code is :
//////
var aDoc = app.activeDocument;
var Sel = aDoc.selection;
var aLayer = aDoc.layers.add();
var newGroup = aLayer.groupItems.add();
Sel[0].duplicate(newGroup, ElementPlacement.PLACEATEND);
newGroup.translate(10, 0);
//////
this is capture image.
I did run script five times.
Object was translate. but circle was not translate.
And, i upload Appearance palette capture image too.
It's not image. It's Path.
If you Know solution, reply for me please.
thank you pixxxel.
Copy link to clipboard
Copied
Hahaha,
you are right – it's not a picture.
But you moved only the path (without his mask). That's the problem.
Look at your transparency palette:
But, who make something like this? The mask is a picture??? (Or perhaps it's a downgrade from a higher Illu-version????)
Copy link to clipboard
Copied
You are right. I translate only the path(without mask).
How can I translate with mask?
it's my code. It translate only the path(without mask).
////////////////////////////////////////////////////////////////////////////
var aDoc = app.activeDocument;
var Sel = aDoc.selection;
Sel[0].translate(10, 10);
////////////////////////////////////////////////////////////////////////////
Do you have solution? help me please.
Copy link to clipboard
Copied
I fear, Javascript has no access to the appearance and/or transparency palette.
But I wondering – you don't mark an answer as correct or helpful and otherwise you need 5 month for your own answer???
Copy link to clipboard
Copied
I'm sorry. that's my fault.
I can't find other words.
And thank you for your answer.
Copy link to clipboard
Copied
Everything is ok. Do not worry.