See if rhino is closing


I’m looking for the override function too add some commands before its closed

Any help?


Too fast, Sorry

AddHandler Rhino.RhinoDoc.BeginSaveDocument, AddressOf BeforeRhinoCloses

 Private Sub BeforeRhinoCloses(ByVal sender As Object, ByVal e As Rhino.DocumentEventArgs)
  End Sub

Its not clear to me whether or not you’ve answered your own question. But an easy way to know when Rhino is shutting down is to override the OnShutdown overridable subroutine on your Plugin object.

For example:

Protected Overrides Sub OnShutdown()
  ' Called one time when plug-in is about to be unloaded. By this time,
  ' Rhino's mainframe window has been destroyed, and some of the SDK
  ' managers have been deleted. There is also no active document or active 
  ' view at this time. Thus, you should only be manipulating your own objects.
  ' or tools here.
  ' TODO: add plugin shutdown code here...
End Sub