3 Replies Latest reply on Jul 3, 2008 12:26 AM by Martin Fischer

    How to adress all pageItems of a masterspread by layer

    Martin Fischer Level 2
      Hello,

      I would like to adress all pageItems of pages and masterSpreads by layer, because I have to get their order (relative to the layer and total over all layers).

      1. app.activeDocument.pageItems will me all pageItems of a document, whether they are on a page or on a masterSpread,
      2. app.activeDocument.layers[0].pageItems will give me all pageItems of pages of a document only, ignoring pageItems of masterSpreads.

      Now how to get every pageItem of every masterSpread of a layer with their order (for copying them in their releative order to a new 'check'-layer)?

      Do I really have to loop thru every pageItem of the masterSpreads, get their layer and their order within the layer and sort the two dimensional array or is there a more simply way to do this?

      with kind regards
      Martin Fischer

      P.S.: I am afraid of Peter's answer in Peter Kahrel, "CS2 JS Master Page Items on layers" #1, 5 May 2008 1:50 am