Maptitude GISDK Help

OpenLayout()

Summary

Creates a layout from a file.

 

Syntax

layout_name = OpenLayout(string file_name, array options)

 

Argument Contents
file_name The path and file name of the layout

 

Option Type Contents
Activate Macro String The name of a macro that is called whenever the window is activated
Close Macro String The name of a macro that is called when the user closes the window from the system menu
Cut Lines Boolean Whether to display page cut lines and page numbers on multiple page layouts. Defaults to "True"
Done Macro String The name of a macro that is called after the window is closed
Grid Display Boolean Whether to display the grid. Defaults to "False"
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. Defaults to "False"
Menu String The menu that is associated with the window
Position Array The screen location of the window in an array of 2 integers {x, y}
Rulers Boolean Whether to display rulers. Defaults to "False".
Search Macro String The name of a macro that is called whenever a file within the layout file is not found.
Size Array The screen size of the window in an array of 2 integers {x, y}
Toolbar String The toolbar that is associated with the window

 

Notes

Returns

A string indicating the name of the layout.

 

Example

folder = RunMacro("G30 Tutorial Folder")

lyt = OpenLayout(folder + "adjust.lay", {

     {"Grid Display", "True"},

     {"Grid Snap", "True"}})

 

Error Codes

Error Type Meaning
Error The file does not exist, or one of the options is invalid
Escape The user clicked Cancel

 

See Also

Function Summary
SaveLayout() Saves a layout to a file
CloseLayout() Closes a layout window
CreateLayout() Create a new layout window
SetDefaults() Sets default menus, toolbars, and macros.

 

 

©2025 Caliper Corporation www.caliper.com