Duplicate Layer
i have been scripting in photoshop , need convert script illustrator.
i use vbscript/javascript , program in .net vb , c# create programs photoshop / illustrator
in photoshop have layer.duplicate duplicate layer contents, cant seem find corresponding 1 illustrator.
in layers window in illustrator can select layer , drop down in layer window select dupliate "layername" have looked @ scripting reference , cant seem find solution.
thanks in advance.
i think find 'layers' not have duplicate method. can create own layer duplicate relative 'pageitems' on new layer. pageitems not have duplicate method more general collection of elements if reference each pageitem in turn can duplicate given location. so…
#target illustrator var docref = app.activedocument; with(docref) { var ln = 'layer 1' var ol = layers.getbyname(ln); var nl = layers.add(); nl.name = ln+' copy'; for (var = ol.pageitems.length-1; >= 0; a--) { ol.pageitems[a].duplicate(nl, elementplacement.placeatbeginning); } }
its little more work in ps thats illustrator you…
More discussions in Illustrator Scripting
adobe
Comments
Post a Comment