this might (again) be a rather stupid question…
What if I wanted to move a layer to the top of the LayerTable?
It happens quite sometimes that I have to add the Default Layer or at least have to move it up to the table again to obtain a proper model (pedantic, but I can’t help myself).
I can find ways to set an index of a layer, but it does not change in the layertable.
Ya, there is no way to programatically reorder/recover the order of the layers. I searched this topic long time ago, but simply there is no API exposed to C#. Perhaps Rhino native plugins can do but I’m not sure.
Hi @mikity_kogekoge and @tobias.stoltmann, it is possible control layer sorting by using some kind of workaround where you add other layers or childlayers to a temporary parent layer and then back to the original parentlayer or the root of layers, leaving the one layer you do want to “move on top” at the first place.
I’ve done this to partially sort using layerstructures which where not sortable with the build in method of the Layers panel (By clicking on the Name column header).
The initial thread for this workaround was here, @Jarek also posted a rvb script here.
Hi @tobias.stoltmann, there is no way yet to access the layer’s panel and perform the sorting. It would be helpful though to define some display order for root level or sub layers within a parent layer programmatically without doing the mentioned workaround. (Which is computationally intensive with large layer structures).