2022-01-26 07:47 AM - last edited on 2024-09-20 09:41 AM by Doreena Deng
I created a code that is inside undoable block. This code generates texts, lines, and hatch (fill) on a worksheet. I can see that those items were generated. (I use APIDo_ZoomID so that the items will be visible every time.)
After generating all the items, they were removed immediately as if Undo button was clicked. But checking on the Undo/Redo button list, no evidence that the action was done.
Solved! Go to Solution.
2022-01-28 09:58 AM
Hi,
It's definitely strange what's happening there. Maybe the command actually aborts due to some reason (out of memory or something like that) and thus AC cleans up by reverting everything.
Was your command done or do you expect more output?
And is the error code of the ACAPI_CallUndoableCommand ok?
2022-01-28 09:58 AM
Hi,
It's definitely strange what's happening there. Maybe the command actually aborts due to some reason (out of memory or something like that) and thus AC cleans up by reverting everything.
Was your command done or do you expect more output?
And is the error code of the ACAPI_CallUndoableCommand ok?
2022-02-02 11:28 AM
Hi,
That usually happens when one of the commands inside results in an exception. This may come from incorrect data passed into Archicad.
Another reason could be that you call this function within a non-standard scope, for example in a notification handler, where a differently scoped undo is needed.
Could you please tell us more details?
Thanks, Ákos
2022-02-18 06:18 AM
I did not check the return of the undoable block. And upon checking, there was indeed an exception.
I already fixed it. Thanks.