In Rhino, I can delete a layer by going to the layers tab, right clicking a layer, and choosing delete layer. What is the equivalent of this in Rhinocommon? I’ve tried Doc.Layers.Purge and Doc.Layers.Delete but neither of these seem to do it.
Hi @samlochner ,
Another reason why Doc.Layers.Purge may fail (other than that layer being the current layer) is when there are block definitions on that layer.
You never mentioned you are trying to delete a layer which has sublayers.
Regardless of that, if you have a block definition on the layer, Purge will fail.