Reply To: Layer Naming & Add Layer with box script wish

#88240
Peter Kahrel
Participant

Here you go:

try {
  app.documents[0].layers.item('Layer 1').name = 'art';

  app.documents[0].layers.add ({name: 'die line', layerColor: UIColors.RED}).move(LocationOptions.AT_BEGINNING);

  app.documents[0].pages[0].rectangles.add (
    app.documents[0].layers.item('die line'), {
      name: 'die line', // More bonus points! (The box is easy to identify in the layers panel)
      geometricBounds: app.documents[0].pages[0].bounds, 
      strokeWeight: '1 pt',
      fillColor: 'die line'
    }
  );
} catch (e) {
  alert (e);
}

Now, what would all those bonus points give me. . .

Peter

This article was last modified on September 9, 2016

Comments (0)

Loading comments...