.NET

Reply
Active Member
rhinton
Posts: 7
Registered: ‎05-01-2009
Message 1 of 2 (88 Views)

Detecting New and Delete Layers

88 Views, 1 Replies
07-22-2009 10:55 AM
Does anyone have procedure for detecting when a new layer is created and when a layer is deleted?
Valued Mentor
cadMeUp
Posts: 331
Registered: ‎05-11-2006
Message 2 of 2 (88 Views)

Re: Detecting New and Delete Layers

07-23-2009 07:18 AM in reply to: rhinton
You can monitor the 'ObjectAppended' and 'ObjectErased' events of a Database. In your event handler check to see if the passed in object is of type LayerTableRecord, then you know if the object being added or erased is a Layer and you can take some kind of action. In the ObjectARX dist, look under ..\samples\dotNet\EventsWatcher for some samples of monitoring Database events.
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!