Hi Everyone,
It the first time I need to use the EVENTHANDLER() function. In my case I need to bind to AutoCAD event. What I am missing is how I can know what to write in the IMPLEMENTS command of my class.
oACAD = CREATEOBJECT("Autocad.Application")
oEvents = NEWOBJECT("jrAcadEvents")
? EVENTHANDLER(ox , oEvents)
oACAD.Documents.OPEN("C:\Intra9\ALINK\vide_m.dwg")
WAIT WINDOW "Done!"
DEFINE CLASS jrAcadEvents AS custom
IMPLEMENTS Documents IN "c:\program files\common files\autodesk shared\acax16enu.tlb"
PROCEDURE Document_BeginOpen(FileName)
Wait Window nowait "Openning file:"+FileName
ENDPROC
ENDDEFINE
When I run this code I get this error:
Program Error
Class cannot be instantiated because Member 'DOCUMENTS_get_Visible' does not exist
In Object browser if found this:
Library AutoCAD
AutoCAD 2004 Type Library
File: c:\program files\common files\autodesk shared\acax16enu.tlb
Help File: c:\program files\common files\autodesk shared\ACADAUTO.CHM (not installed)
GUID: {1EFD8E85-7F3B-48E6-9341-3C8B2F60136B}
Is there some thing I am missing?