3.3.2.61 Undo

This command provides a LabTalk interface to Origin's Edit: Undo menu command.

Syntax:

undo [option] [dataset]

For an understanding of usage, review the sample scripts provided in the Examples section.

Note: Some actions in Origin do not add anything to the undo stack and are therefore not reversible. Other actions will clear the undo stack. To find where this option is currently implemented, search the OGS files for "undo".

Options:

no option; Undo the last action

Undo the last action.

dataset; Backup dataset

Syntax: undo dataset

Backup dataset by creating an internal copy of dataset.

-dr; Create an internal copy of specified dataset range

Syntax: undo -dr dataset i1 i2

Create an internal copy of the specified dataset range. The dataset range includes rows i1 to i2. To create an internal copy of a single data point, set i1 = i2. Origin executes this command internally when a data point is deleted from the graph window using the Data: Remove Bad Data Points menu command.

-dx; Create an internal copy of dataset

Syntax: undo -dx dataset

Create an internal copy of dataset. Origin executes this command internally when a data plot is (horizontally) translated using the Analysis: Translate: Horizontal menu command.

-wa; Create an internal copy of the datasets in the active worksheet

Syntax: undo -wa

Create an internal copy of the datasets in the active worksheet. Origin executes this command internally when Edit: Clear Worksheet is selected.

-wc; Create an internal copy of the datasets in the specified worksheet wks

Syntax: undo -wc wks

Create an internal copy of the datasets in the specified worksheet wks. Origin executes this command internally when Analysis: Sort is selected.

-wr; Create an internal copy of the selected dataset range in the active worksheet

Syntax: undo -wr

Create an internal copy of the selected dataset range in the active worksheet. Origin executes this command internally when Analysis: Normalize is selected.

Examples:

Example 1

undo Data1_B;    // Make an internal copy of Data1_B. 
Data1_B+=4;
undo;    // Undo the dataset modification.

Example 2

undo -wr;    // Make an internal copy of the selected range. 
Data1_B/=4;
undo;

Example 3

undo -wc Data1;  // Make an internal copy of datasets in Data1. 
Data1_A+=4;
Data1_B+=4;
undo;    // Undo the dataset modification.

Example 4

undo -dr Data1_B 2 2;  // Make an internal copy of the second data point. 
mark -d Data1_B -b 2 -e 2;  // Delete the second data point. 
undo;

See Also:

Clipboard (command)