L_AutAddUndoNode

#include "ltaut.h"

L_LTAUT_API L_INT L_AutAddUndoNode(pAutomation, dwFlags);

pAUTOMATIONHANDLE pAutomation;

/* pointer to an automation handle */

L_UINT32 dwFlags;

/* reserved */

Manually adds an undo node to the automation object.

Parameter

Description

pAutomation

Pointer to an automation handle.

dwFlags

Reserved for future use. Use 0.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function adds an undo node to the automation object. When used with L_AutSetUndoEnabled, a lengthy operation, consisting of multiple steps, can be combined into one undo call to L_AutUndo. To accomplish this, use the following steps:

1.

Call L_AutAddUndoNode to add an undo node to the automation handle.

2.

Disable the undo feature by calling L_AutSetUndoEnabled (pAutomation, FALSE).

3.

Perform the operations to be combined into one undo, For example:

Vector Rotate

Vector Scale

Vector Translate

4.

Re-enable the undo feature by calling L_AutSetUndoEnabled (pAutomation, TRUE).

Now, all three operations can be undone with one call to L_AutUndo instead of three calls to L_AutUndo.

Required DLLs and Libraries

LTAUT

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_AutSetUndoEnabled, L_AutSetUndoLevel, L_AutUndo, L_AutRedo

Topics:

Undoing and Redoing Automation Operations

Example

 L_INT AutAddUndoNodeExample(pAUTOMATIONHANDLE pAutomation)
{
   L_INT nRet;
   /* Add an undo node manually */
   nRet = L_AutAddUndoNode( pAutomation, 0L );
   if(nRet != SUCCESS)
      return nRet;
   /* Disable the undo feature */
   nRet = L_AutSetUndoEnabled ( pAutomation, FALSE );
   if(nRet != SUCCESS)
      return nRet;
   /* Do multiple operations on the automation object */
   /* Re-enable the undo feature */
   nRet = L_AutSetUndoEnabled ( pAutomation, TRUE );
   if(nRet != SUCCESS)
      return nRet;
   return SUCCESS;
}