Sort layers RhinoScript


#1

I have a couple of scripts that add layers to the current layer, is there some way to sort just the current layer after the new layers have been added.

Thanks Mark


(Dale Fugier) #2

I’m not sure I understand this. Are you adding sub-layers of the current layer?

You could sort the layer names before adding them…


#3

One of the scripts adds 3 layers Crvs, Dims and Model to the current layer, they are added alphabetically. The second script adds 3 layers I use when I export to my CAM program and I’d like all six layer in alphabetical order. I guess what would be useful is some way to sort all the sublayers of just the current layer.
I don’t want to add all six layers at the same time because the CAM layers are not always needed.

Thanks Mark


#4

It would be nice if RhinoCommon Layer.SortIndex method could be used to set the new sortindex value also, not only to return its current value.