SaveLayout()
Summary
Saves a layout to a file.
Syntax
SaveLayout(string layout_name, string file_name [, array options])
| Argument | Contents |
|---|---|
| layout_name | The name of the layout, or null for the current layout |
| file_name | The path and name of the file |
| Option | Type | Contents |
|---|---|---|
| Header Data | Any | A value to store in the file header, including an array |
Notes
The options array is an optional argument.
Example
SaveLayout("My First Layout", "c:\\myfile.lay")
// HeaderData variable defined previously
SaveLayout( , "c:\\myfile1.lay", {{"Header Data", HeaderData}})
Error Codes
| Error Type | Meaning |
|---|---|
| Error | Error writing to the file (e.g., the disk is write protected or out of space) |
| NotFound | There is no layout with the specified name |
See Also
| Function | Summary |
|---|---|
| CloseLayout() | Closes a layout window |
| CreateLayout() | Creates a new layout window |
| GetLayout() | Gets the name of the current layout window |
| OpenLayout() | Creates a layout from a file |
|
©2026 Caliper Corporation |