You are on page 1of 1

CHAPTER 1: Layout Layers 24

Solution

 Use ILayerList to get the document layers(kDocumentLayerBoss).

 Use ISpread::QueryLayer to get the spread layers associated with a document layer.

Sample code

 SnpInspectLayoutModel

 In the “Layout Fundamentals” chapter of Adobe InDesign Programming Guide, see the example entitled
“Code that Iterates through Spreads in a Document, then Iterates through Document Layers, to visit
Items on the Spread Layer associated with each Document Layer.”

Related APIs

 ILayerList

 ISpread

 kDocumentLayer

 kSpreadLayer

Rearranging the order of layers


Solution

Use kMoveLayerCmdBoss.

Related APIs

 kDocumentLayer

 kSpreadLayer

Copying a layer
Solution

To append the duplicated layer to the end of the layer list (ILayerList) in the target document, use
kCreateLayerFromLayerCmdBoss.

To position the duplicate at a position of choice in the layer list (ILayerList), use the following:

1. kNewLayerCmdBoss creates a new layer.

2. kMoveLayerCmdBoss positions the new layer.

3. kDuplicateLayerCmdBoss copies the content.

You might also like