Hi
I am trying to write a C# plugin that performs some operations on geometry and I assign layers to the objects. But, I can also see some unused layers which do not contain any geometry object. I want to delete/purge them using my code. These layers could also include active layer if it is unused at the end of all operations.
Questions:
- What is a good way to avoid any issues with deleting the active layer? Should I make the last layer that I assign an object through my code the active layer?
- How do I code the delete/purge layer method. I think it should have a loop that first checks each layer and the objects assigned to it and deletes the layer until the while loop condition is true.
I am very new to this. Any leads will be appreciated. Thanks