Howto "listen for save or saveas -event" ?

Howto "listen for save or saveas -event" ?

Anonymous
Not applicable
322 Views
1 Reply
Message 1 of 2

Howto "listen for save or saveas -event" ?

Anonymous
Not applicable
Hello,

my application work with an external database.
I plan that the application buffering the database changing
(sql-commands) and update the database after or between
the user save the dwg.

How can i listen for the "save" or "qsave" events?

thanks in advanced
Mario
0 Likes
323 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Hello,

is that the right way?

It works:

[code]
< commandclass="">

Public Class KSROApplicationKoordToolsCommands

...

Public Sub New()
If (Me.KoordTools.boUseUpdatePDBFileAfterACADSave) Then
Dim doc As Document = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument
AddHandler doc.CommandEnded, New CommandEventHandler(AddressOf cmdEnded)
End If
End Sub

Public Sub cmdEnded(ByVal o As Object, ByVal e As CommandEventArgs)
Dim ed As Editor = Application.DocumentManager.MdiActiveDocument.Editor
Try
If e.GlobalCommandName.ToUpper.Contains("SAVE") Then
Me.KoordTools.PDB_Save()
ed.WriteMessage("Koordtools: Punktdatenbank wurde geschrieben.")
End If
Catch ex As System.Exception
ed.WriteMessage("!Koordtools.cmdEnded: " + ex.Message)
End Try
End Sub

...

End Class
[/code]
0 Likes