Is it possible to change a public property before the command actually runs?
Hoped I could use:
AddHandler Rhino.Commands.Command.UndoRedo, AddressOf undo
Private Function undo(ByVal sender As Object, ByVal e As Rhino.Commands.UndoRedoEventArgs)
MsgBox("undo")
Return Rhino.Commands.Result.Success
End Function
but this runs at every undoredo added and not when Undo is used.
AddHandler Rhino.Commands.Command.BeginCommand, AddressOf startofcommand
AddHandler Rhino.Commands.Command.EndCommand, AddressOf endofcommand
Private Function startofcommand(ByVal sender As Object, ByVal e As Rhino.Commands.CommandEventArgs)
'change command
Return Rhino.Commands.Result.Success
End Function
Private Function endofcommand(ByVal sender As Object, ByVal e As Rhino.Commands.CommandEventArgs)
'change command
Return Rhino.Commands.Result.Success
End Function
Some of my commands do a lot automatic. But if I undo I sometimes have to undo 3-4 times to get back to before I used the command. Is it possible the undo them all at the same time again?
I know I can do this with:
-_runscript(
new sub blablabla
rhino.command(“mycommand”)
end sub
blablabla
)
But got the feeling there is an easier solution.
Any suggestions?