I want to write a function to grouping selected layers and groups into a new group.
It works fine with layers, but with groups I get an error "Illegal argument".
In a document with just two groups (and the background layer) this code doesn't works and I dont know why :S
// I want move "Group 1" into "Group 2" var g1 = app.activeDocument.layers.getByName("Group 1"); var g2 = app.activeDocument.layers.getByName("Group 2"); g1.move(g2, ElementPlacement.INSIDE);
Thanks in advanced