.NET

Reply
Active Contributor
pva75
Posts: 48
Registered: ‎07-22-2012
Message 1 of 3 (178 Views)
Accepted Solution

Event for change active layer in document

178 Views, 2 Replies
08-24-2012 11:58 AM

Hi all,


Is there event for change current (active) layer of document?
(it's not Database.ObjectModified - it's not raised).


I tried to do it with binding as:

  public void Initialize()
  {
    var layerList = Application.UIBindings.Collections.Layers;
    layerList.PropertyChanged += new PropertyChangedEventHandler(LayerList_PropertyChanged);

 

And -= in Terminate, but... Autocad 2012 chashed _sometimes_!!!
Impossible to understand when it happned...
So I reject this way.

 

Is there other way to handle this event?

 

Thanks,
Pavel.

Have you tried handling the system variable changed event, watching for the CLAYER system variable?

Valued Mentor
DiningPhilosopher
Posts: 370
Registered: ‎05-06-2012
Message 2 of 3 (169 Views)

Re: Event for change active layer in document

08-24-2012 02:35 PM in reply to: pva75

Have you tried handling the system variable changed event, watching for the CLAYER system variable?

Active Contributor
pva75
Posts: 48
Registered: ‎07-22-2012
Message 3 of 3 (153 Views)

Re: Event for change active layer in document

08-24-2012 09:48 PM in reply to: DiningPhilosopher

It's super idea! It woks fine and not crashed.

 

Thanks!

Pavel.

Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.