Set Undo statement - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

The Set Undo statement turns the Layout Designer window’s Undo feature on or off. You can issue this statement from the MapBasic window in MapInfo Pro.

Syntax

Set Undo [ Window window_id ] { Enable | Disable }

window_id is an integer window identifier for a Layout Designer window. If you omit the optional Window clause, then this statement uses the front-most Layout Designer window.

Description

The Set Undo statement turns the Layout Designer window’s Undo feature on or off. When your MapBasic script performs a large number of layout changes, turning off the Undo feature could reduce memory usage or increase processing speed.

By default, every Layout Designer window is able to undo recent additions, deletions, and edits made to the layout. To turn off the Undo feature, issue a Set Undo statement with the Disable keyword. To re-enable the Undo feature, use the Set Undo statement with the Enable keyword.

Note: The Set Undo statement has no effect on table edits. To turn off Undo for table edits, see the Set Table statement.

Each Layout Designer window has a separate Undo history. The Set Undo statement affects only the window that you specify. To turn off the Undo feature for multiple layouts, issue multiple Set Undo statements.

Disabling Undo for a Layout Designer window clears its Undo history. When you enable Undo, the window begins to store a history of edits that you can then undo.

See Also:

UndoInfo() function Set Table statement