If you record a macro in IsoDraw and select the "Revert" command form the File Menu , something like
is recorded. Truely this is what happend - the current file was closed and opend again.
If you want to create an IsoDraw macro for your macro library this is probably too specific.
More likely you don't want to load the file recorded, but the actual file when executing the macro.
So you could replace the recorded lines by
which does exactly the same as if you manually select the "Revert" command from the File Menu.
This method has two drawbacks:
An other approach is to store the path and name of the file before closing and than open the same file:
Define sDoc as String
sDoc = activeDoc.Path
Here is a complete SubMacro for your macro library that handles all this.
(Anyhow - no warranties!)
SubMacro Revert( Boolean bQuiet )
# Implements a substitute for
# MENU "Revert"
# that is language independend
# and can be quiet or not.
If ( exists(activeDoc) ) then
If ( activeDoc.modified = 0 ) then
If ( bQuiet = false )
Message "Document is saved - can not revert."
Define bClear as Boolean
If ( bQuiet = false ) then
bClear = Get Boolean "Do you really want to revert all changes?"
bClear = true
If ( bClear = true ) then
Message "No open document - can not revert."
# Do Revert with User Messages:
# Do silent Revert: