I’m saving OpenNurbs files from my application and I want to be selective of which layer i’m exporting. Since I won’t be exporting all layers, I need to change the objects individual attribute.LayerIndex, because it won’t be the same in the resulting 3DM file.
When i’m adding the layers to the File3dm.Layers collection using:
It returns no index, so I tried doing this right after:
int index = file3DM.Layers.IndexOf(rhinoLayer);
but index is always -1.
I tried to do file3DM.Polish() but it still returns -1. I could iterate the collection and find the index myself, but I was wondering if there’s something i’m missing to assign the added layers index?