.NET

Reply
Active Contributor
jramos
Posts: 26
Registered: ‎01-16-2007
Message 1 of 2 (69 Views)

Events with C#

69 Views, 1 Replies
02-14-2007 02:53 AM
I'm developing an application for AutoCAD 2005 with C# (using COM). Most of the features I had to implement are done but now I can't figure out how to make events work (ObjectAdded and ObjectErased are never called). I searched the Help and it says that one must "Enable Document Level Events in Environments Other Than VBA" and they have an example on how to do it, but it's not in C# and I can't simply figure it out...

Can someone help? Thanks...
*Bobby C. Jones
Message 2 of 2 (69 Views)

Re: Events with C#

02-14-2007 06:17 AM in reply to: jramos
If you're an AUGI member you can download past AU handouts.

http://www.augi.com/education/auhandouts.asp

Get 'AutoCAD Automation with C#'. It's all about com interop with C# and
AutoCAD. The PDF has a section on hooking into events.
--
Bobby C. Jones
http://BobbyCJones.spaces.live.com

wrote in message news:5485955@discussion.autodesk.com...
I'm developing an application for AutoCAD 2005 with C# (using COM). Most of
the features I had to implement are done but now I can't figure out how to
make events work (ObjectAdded and ObjectErased are never called). I searched
the Help and it says that one must "Enable Document Level Events in
Environments Other Than VBA" and they have an example on how to do it, but
it's not in C# and I can't simply figure it out...

Can someone help? Thanks...
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!