I want to rename a bunch of layers. The Grasshopper script has the correct name and data structure, but when when ‘pushed’ via the cache component, the results are not as expected.
I’m not sure what is happening here. Seems like two possible issues:
It is modifying the layer in sequence but becuase the parent layer is first, the later layers are failing becuase they can no longer be found. But the query model layers component is not live-streaming to not sure why this would be happening.
The model layer component doesn’t like full layer names (i.e. nested layers).
One possible solution is to just modify the lowest element in the layer hierarchy but there must be an easier solution. Any thoughts?
This is an improvement, but it still can’t do multiple levels at once (can’t rename both a child and its parent, but can rename a top level layer and a sub-layer of a different parent).
How about renaming the root without the “TEST_” and reassigning the child layer parent to the renamed layers?
The name attribute of the Model Layer component only renames the layer’s name. If you give it the full layer name path, it will start making new sub layers starting at that layer effectively duplicating the layer path structure preceding it.
If you rename the root, the children remain tied to original parent. So you just have to reassign the parent. I believe. @Kike will know most about this.