Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Copy item style attributes/properties to other item?

$
0
0

Just want to ask if someone know if there is short way to copy item properties to other object, than go through every possibilities with script. There is quite many possibilities with strokes and so on, so this could be helpful...

I mean like with "Eyedropper Tool", but with the script

 

I can set them manually like below. But just want to know is there already some "shortcut" way to handle this kind object style copying?

 

var doc = app.activeDocument;
var selectedItems = doc.selection;

var newLayer = doc.layers.add();
var ellipse = newLayer.pathItems.ellipse(100, 0, 100.0, 100.0, false, true );

ellipse.fillColor = selectedItems[0].fillColor;
ellipse.strokeColor = selectedItems[0].strokeColor;
ellipse.strokeWidth = selectedItems[0].strokeWidth;
ellipse.strokeDashes = selectedItems[0].strokeDashes;
ellipse.strokeDashOffset = selectedItems[0].strokeDashOffset;
// etc etc...

Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>