SetLayoutOptions()

Summary

Change the options for a layout.

Syntax

SetLayoutOptions(string layout_name, array options)

Argument Contents
layout_name The name of the layout, or null for the current layout
Option Type Contents
Cut Lines Boolean Whether to display page cut lines and page numbers on multiple page layouts
Grid Display Boolean Whether to display the grid
Grid Settings Array {string unit, integer resolution divisor, integer minor interval, integer major interval}. See notes below
Grid Snap Boolean Whether to snap new annotations to the grid
Menu String The menu that is associated with the window
Title String The layout title
Rulers Boolean Whether to display rulers

Notes

  • The grid resolution divisor indicates what division of the units is used as the snap grid resolution. For example, 8 would indicate 1/8 of a unit.

  • The grid intervals specify the number of grid resolution units between each light (minor) or bold (major) display grid tick. For example {"inch", 8, 2, 4} would specify a grid with light ticks every 1/4 inch and a bold tick every 1/2 inch.

Example

// Before running the example, open any layout.
SetLayoutOptions(, {{"Grid Display", "True"},{"Title", "New Title"}})
DrawLayout()

Error Codes

Error Type Meaning
Error One of the options is invalid
NotFound There is no layout with the specified name

See Also

Function Summary
CreateLayout() Creates a new layout window
GetLayoutOptions() Gets the current option settings for a layout
OpenLayout() Creates a layout from a file