How to duplicate layer with all sublayers and all objects in them

Hi there,

I’d like to know how to duplicate layer with all sublayers and all objects in them.

with Python script.

I’m sure I only give one new layername.

Hi, here is a script from my library that should do what you want… --Mitch

DupLayerSublayersAndObjs.py (2.4 KB)

1 Like

Thank you,
This script is not work well when source layer have child layer in Rhinoceros 5 SR13 64bit.

This script is correct, but layer.py (in SR13) is not good.

I found this issue about a year ago.

I checked layer.py in my computer( Rhinoceros SR13 64bit is installed) , but it seems not be fixed.