How to place Layersets into Layersets.
I have checked the forum and I found how to place a layer into a layerset but when I try to apply the same method for placing a layerset into a layerset I get this error.
Illegal Argument. .....
This is the code that I am using:
| //Making off LayerGroups | |
| var OccGroupLay = app.activeDocument.layerSets.add(); |
var OccLivery_01Lay = app.activeDocument.layerSets.add();
var OccLivery_02Lay = app.activeDocument.layerSets.add();
var OccMkLay = app.activeDocument.layerSets.add();
//renaming Layers
OccGroupLay.name = ('OCC');
OccLivery_01Lay.name = ('Livery_01');
OccLivery_02Lay.name = ('Livery_02');
OccMkLay.name = ('MK');
| //move the layers into the layerset |
OccLivery_01Lay.move(OccGroupLay, ElementPlacement.INSIDE);
| OccLivery_02Lay.move(OccGroupLay, ElementPlacement.INSIDE); |
