Reply

Clearing an undo stack in ST8, ST9...

Hi all,

 

I have a problem with cleaning an undo stack in SolidEdge beginning from ST8 (maybe ST7) - I need to clean the stack to avoid user to make some undo steps that can break our workflow.

In the past I used the following code, that "cleared" the undo stack:

 

 int i = ((SolidEdgeDocument)oDoc).UndoSteps;
 ((SolidEdgeDocument)oDoc).UndoSteps = 0;
 ((SolidEdgeDocument)oDoc).UndoSteps = i;

Note: oDoc is an active assembly document

 

This code now doesn't work - the lasts steps are "restored" in the undo stack when I set UndoStep property to the original count.

 

Do you have any idea, how can I clear the undo stack in ST8, ST9?