Hello, I'm trying to capture the events onOpen() and onNew() in an Autocad App.

I checked the VBA help and I got:

--------------------------------------------------------------------------------
Public WithEvents ACADApp As AcadApplication
---------------------------------------------------------------------------------
Sub Example_AcadApplication_Events()

Set ACADApp = GetObject(, "AutoCAD.Application")

End Sub

---------------------------------------------------------------------------------
Private Sub ACADApp_BeginOpen(FileName As String)

MsgBox "A drawing is about to be loaded from: " & FileName

End Sub
--------------------------------------------------------------------------------

And I put this in Class Modules in a class named Class1.

now I have a macro that is executed once at the begining...

I plugged this code at the end of that macro:


Dim Inst As New Class1
Inst.Example_AcadApplication_Events


But nothing happens when I open a file in Autocad!!

any help?

any suggestions for the "onNew()" event?


thanks allot