Hello support forum pioneers:
I have a python script that I'm using to make 1600 Make2Ds, and it recently broke with the most recent Rhino 5 release, because it relied on selecting objects by layer name after a Make2D.
I understand that multiple layers can now share the same name, and that Make2Ds will create such layers, nested within others, but this eliminates the ability to reliably get layers or their contents based on layer name, especially after a Make2D.
I also occasionally use -SelLayer and a layer name in aliases to do tasks while modeling.
So I guess my questions are:
Is there still a way to select by layer name, despite the fact that multiple layers can share the same name?
If not, would it be possible to implement such a thing?
Assuming that the shared layer names feature is not changed, it seems like there could be some way of selecting layers by name that could include parent layers as prefixes. for example:
-SelLayer Make2D.Hidden.MyLayer or something similar.
Or perhaps one could distinguish between two layers with the same name using something like this:
I do think that allowing layers to share a single name creates a small dilemma for scripting and automation, and since I automate Rhino a lot, I would prefer not to have such a feature. But if it's going to stay, maybe there could just be some work around for selecting specific layers for those of us who use automation and scripting.
Thanks for any thoughts or suggestions!
I do like the Make2D.Hidden.MyLayer idea. Clean, simple and straight forward. Hopefully that can be implemented. I tried to figure this out for a little while yesterday after I read your post on the NG, but it is a tricky deal to drill down several layers and get the right one.
Hi Benjamin- I am not sure this is working 100% yet but try double colon as the separator for explicit layer paths-
I tried this in both a python script and in command line but it didn't work.
However, Steve Baer said that it should with the next WIP, and explained what sounds like a great solution, with Find functions.
And thank you Don for following my post across three different support discussions!
One other thing that I think would be really useful, and this might already be in the works:
for Make2D, it would be extremely useful to have an option to create a viewport boundary along with the other geometry. This would save a lot of time for coordinating exported make2Ds with renders.
Hi Ben- yep, this is on the pile- it has come up a few times recently, and should get in there before we're all done.