Help using AddItemNotify in DrawingDoc?

Hi,

I'm having trouble triggering the AddItemNotify event from a drawing. Below is the framework of my code.

Title Module:

Option Explicit

Private swEventListener As swEvents

 

Sub main()

    Set swEventListener = New swEvents

End Sub

Class Module:

Option Explicit

Private WithEvents swApp As SldWorks.SldWorks

Private swModel As SldWorks.ModelDoc2

Private WithEvents swDrawing As SldWorks.DrawingDoc

Private swDocType As Long

 

Private Sub Class_Initialize()

    Set swApp = Application.SldWorks

End Sub

 

Private Function swApp_FileNewNotify2(ByVal NewDoc As Object, ByVal DocType As Long, ByVal TemplateName As String) As Long

   If DocType = 3 Then

        Set swDrawing = swApp.ActiveDoc

    End If

End Function

Private Function swDrawing_AddItemNotify(ByVal EntityType As Integer, ByVal ItemName As String) As Integer

End Function

When I try to compile I get an error on the AddItemNotify function saying "Procedure declaration does not match description of event or procedure having the same name" I'm not exactly sure where the error is, and reading this related post makes me (and my compiler!) even more confused.

Any help would be very much appreciated!

SolidworksApi macros