Site Tools

How to: Clear Rhino's Undo and Redo Lists

Developer: C++
Summary: Demonstrates how to clear Rhino's undo and redo lists

Rhino lets you undo the most recent create, edit, or transform commands.

If you are performing editing operations on large memory consuming objects, Rhino's undo list can quickly grow very large. When this happens, most Rhino users run the ClearUndo command to clear the undo list. It is also possible to clear the undo list from within a plug-in.

The following sample code demonstrates how to clear Rhino's undo and redo lists.


CRhinoCommand::result CCommandTest::RunCommand( 
        const CRhinoCommandContext& context 
  RhinoApp().Print( L"Clearing undo and redo lists.\n" );
  context.m_doc.ClearUndoRecords( true );
  return CRhinoCommand::success;
developer/sdksamples/clearundo.txt ยท Last modified: 2016/02/04 by sandy