I’m trying to assign an object to a Layer by using the layer name, but I’m so far not able to get it done, the best example I can find:
But that uses the layer index. In my case I have just created the layer and given it a name:
for item in items:
itemObject = importRhinoFile(item)
itemName = item.replace(".3dm","",1)
itemName = itemName.replace("Base","",1)
itemLayer = Rhino.DocObjects.Layer()
itemLayer.Name = itemName
sc.doc.Layers.Add(itemName)
I would now like to assign the item with itemName
to the layer with the same name. Is this possible?