Professional Documents
Culture Documents
Solutions 7
Solutions 7
Getting started
This chapter presents layout-related use cases. To solve a layout-related programming problem, like
creating a spread or finding the frames in a spread, look for a use case that matches your needs.
To learn about how layout works and how it is organized, do the following:
Run through the activities in “Exploring layout with SnippetRunner”, to learn how to explore the
layout-related objects in a document and familiarize yourself with layout-related sample code.
Solution
1. Run Adobe® InDesign® with the SnippetRunner plug-in present. For instructions on using the plug-in,
see the API documentation page for SnippetRunner.
3. Run the InspectLayoutModel code snippet to create a textual report about the objects in the
document’s layout hierarchy.
5. Deselect the new frame and run the InspectLayoutModel code snippet, to see how the document’s
layout hierarchy has changed. A new kSplineItemBoss is created.
NOTE: If an object is selected, InspectLayoutModel reports the hierarchy of only the selected object. If
nothing is selected, it reports the hierarchy of the entire document.
7. Make sure the placed frame is selected, and run the InspectLayoutModel code snippet to report the
objects in the hierarchy of the graphic frame.
8. Create other objects in a document or open documents containing layouts that you want to examine,
and use InspectLayoutModel to examine the boss objects representing the layout hierarchy.