|
-
Feb 23rd, 2004, 07:35 AM
#1
Thread Starter
New Member
OpenEvent
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|