CloseLayout()

Summary

Closes a layout window.

Syntax

CloseLayout(string layout_name)

Argument Contents
layout_name The name of the layout, or null for the current layout

Notes

  • Layers that are referenced only in maps in the layout that is closed are dropped from the system.

  • CloseLayout() closes the layout window without executing the Close() macro.

  • If there is a Done macro, it is called after the layout window is closed.

Example

// Here's a macro to close all open layouts
lyts = GetWindows("Layout")
for i = 1 to lyts.length do
CloseLayout(lyts[i])
end

Error Codes

Error Type Meaning
NotFound There is no layout with the specified name, or layout_name is null and the current window is not a layout window

See Also

Function Summary
CreateLayout() Creates a new layout window
OpenLayout() Creates a layout from a file
SaveLayout() Saves a layout to a file