When using this method with the flag 0x002 (Suppress the prompt that unsaved changes will be discarded) the dialog that is suppressed is still displayed for a moment as a little box (see attached) in the center of the Arbortext Editor window.
We've even had situations where this little box has not disappeared but stayed on screen and waited for the user. All the user could do then was hit ESC which closed the dialog and carried on.
For clarity we are using Arbortext Editor 6.1 M060
That funny nano-popup sounds like a bug to me. You might want to file a case with PTC support on that.
In the meantime, as a workaround, you can use the modified() function to trick Arbortext into thinking the file hasn't been updated before calling doc_revert(), which should avoid the warning message. So, do something like this:
# assume $doc is your doc ID
modified($doc, 0); # tell Arbortext to forget the doc has changed
While your suggestion does allow us to not use the suppress warning flag, it still shows the nano-popup
I'll raise the issue with PTC support and report the results here.
In that case, I have to think the funny nano-popup is something other than the unsaved changes warning. Are you using an adapter to connect to a CMS or something similar? I wonder if maybe that could be the source of the mystery box.
I'll look forward to seeing what the response from PTC says.
Did you open a case for this? If so, feel free to share any results you got from it here with the Community.