Undoes the last automation operation performed in the active automation container.
#include "ltaut.h"
L_LTAUT_API L_INT L_AutUndo(pAutomation, dwFlags)
Pointer to an automation handle.
Reserved for future use. Must be 0.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
L_AutUndo must be called at least once in order to perform a "redo" using L_AutRedo.
To determine the current undo level call L_AutGetUndoLevel.
To change the undo level call L_AutSetUndoLevel.
To determine whether an automation operation can be undone, call L_AutCanUndo.
For information about grouping multiple operations into a single undo process, refer to L_AutAddUndoNode.
This example shows how to undo the last automation operation.
L_INT AutUndoExample(pAUTOMATIONHANDLE pAutomation)
{
L_INT nRet;
nRet = L_AutIsValid ( pAutomation );
if(nRet != SUCCESS)
return nRet;
if ( nRet == SUCCESS ) /* check the validity of the automation handle */
{
L_BOOL fCanUndo ;
/* Query the ability of undoing */
nRet = L_AutCanUndo ( pAutomation, &fCanUndo ) ;
if(nRet != SUCCESS)
return nRet;
if ( fCanUndo )
{
/* undo the last automation operation */
nRet = L_AutUndo ( pAutomation, 0 ) ;
if(nRet != SUCCESS)
return nRet;
}
}
else
{
return nRet ;
}
return SUCCESS ;
}