1 Reply Latest reply on Aug 31, 2013 2:01 AM by hutn.jimbo

    Error grouping items - Error 9024: Cannot modify a layer that is locked

    hutn.jimbo Level 1

      Hello,

       

      I'm trying to group all sublayers so that i can easily resize the group.  But when I run this code:

       

      var gi = doc.activeLayer.groupItems.add();

      for(var i = 0; i < doc.selection.length; i++) {

           doc.selection[i].move(gi, ElementPlacement.PLACEATBEGINNING);

      }

       

      I get an error saying 'Error 9024: Cannot modify a layer that is locked'.  I have checked and the layer is not locked at all. Some layers resize fine, but it keeps getting stuck on one or 2 layer within each .ai file I have. 

       

      Any ideas what this might be?

       

      Thanks,

      James