2 Replies Latest reply on Mar 13, 2008 12:07 PM by KeithGilbert

    [JS CS3] Setting the default layer

      I've been through the ID JS DOM, and I can't seem to find a reference for this...I think I'm missing something basic here.

      I've created two new layers via JavaScript:

      myDoc.layers.add ({name: 'manufacturers index', layerColor: UIColors.green});
      myDoc.layers.add ({name: 'product index', layerColor: UIColors.red});

      After running the script, the document is left in a state where "product index" is the target layer, and any new objects that are created are created on that layer.

      I want the script to leave the document in a state where the original "Layer 1" in the file is the target layer. How do I do this via JavaScript?