Why UNDO reverts too many operations?


An undo step reverts many more operations than was expected. It may or may not be possible to redo and recover the lost steps


The cause is unknown but in general terms there is a mismatch between the start of something and the end of something markers and this mismatch will be triggered by a very specific operation. UNDO relies on these starts and ends and it's crucial these do not get corrupted.

UNDO cannot undo creation of entities from a previous session. If entities from a previous session are erased, then the problem is not one of excessive undo.


Start the program in SafeMode.

If the problem goes away when running in Safe Mode, then it can be helpful to switch back to normal mode and disable or uninstall plugins and customization to narrow down the culprit.

If the problem persists, enable diagnostics to find out more:

  • Set QAFLAGS=256 (cmd message enable). This enables undo diagnostic.

    A prompt tells the user when the command history has been corrupted.

  • When the program raises an alert about the command history then issue DUMPSTATE on the Command line. This will write a report to the startup folder. Send us the report.
  • Set LOGFILEMODE = 1 and repeat the steps to reproduce the issue. The LOGFILEMODE system variable controls the generation of BricsCAD log files that retain each executed command. The log files are saved in the folder specified by the LOGFILEPATH system variable.

A distinction should be made between very different things:

  • corrupt command history causing undo rewinding too much.
  • undo deleting a large part of the drawing including entities from a previous session;
  • undo stops working.
  • things that are, intentionally or not, ignored by undo; This is not a fault with the undo mechanism, just an operation that is not registered with undo
  • crashes on undo.
  • things that are undone correctly but a screen update is missing.

This article is only about the first three items.