.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Event for change active layer in document

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
pva75
569 Views, 2 Replies

Event for change active layer in document

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.

2 REPLIES 2
Message 2 of 3
DiningPhilosopher
in reply to: pva75

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

Message 3 of 3
pva75
in reply to: DiningPhilosopher

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

 

Thanks!

Pavel.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost