We are using the .NET Rhino3dm library to export files from our software. What we have noticed is that it appears layer names have to be unique using Rhino3dm or it will start adding “01”, “02”, etc. on the end of the layers.
In Rhino it is no issue to have layers or sublayers with the same name.
In Rhino we can do:
Trying the same using Rhino3dm it automatically renames the layers to:
It wouldn’t be so bad, if it at least then renamed the first instance to “Result 01” and not the 2nd instance. I know in programming we always start at 0, but these layer names are intended for humans, so in my opinion you should rename the first instance to “Result 01”, the second to “Result 02”, etc. Or rename the first instance to “Result 00” at least, so it follows the same pattern.
But the real question is why Rhino3dm here is different to Rhino and how we can prevent the automatic layer renaming.
Thanks for creating the issue. Yes, we are using AddLayer I believe, because CreateLayer was not working. It would not add a layer.
Now using AddLayer we noticed that it automatically renames layers by adding numbers. We also noticed that if a layer has say “_01” at the end of a layer and the layer exists twice, it actually replaces the “_01” with " 01". So the auto-renaming seems a bit aggressive and actually removes part of the original layer names.
I mean we kind of worked around it now and made all layer names unique, which has the advantage of better searchability.
It’s a bit hard to share code, since we are using Rhino3dm in vvvv Gamma, which is a visual coding language.