Hi,
For example,
I want to get only the circle in the top layer called “Layer 01” using “Reference by Layer”. But, because there is a sub-layer that is also named “Layer 01” under “Layer 02” the component outputs the rectangle in the sub-layer together.
Can anyone tell me the way to get exact match name?
I’d say identically named parent layers and child layers is a situation most people try to avoid. Multiple child layers with identical names are not a problem and it works fine with Elefront. In case a link is required between objects on different layers I would use Object Names and/or User Attributes.
Hi Teru, if you have nested layers, you can use the double colon “::” syntax to access objects on nested layers, even if they have the same name. They same syntax is used to create nested layers. To get to the innermost layer, you would use this string “Layer 01::Layer 01::Layer 01”
In this case, the pentagon is on the innermost Layer 01
The problem described in the first post is that the Reference by Layer component finds all layers with the text fragment “Layer 01” which in this case returns two curves. The Elefront component seems to work with a flat list of layer names whereas it should use full layer names. Or at least provide the option to work with full layer names…
@martinsiegrist, fair enough. Right now eleFront uses pattern matching to search the layer table. Since “Layer 01” will match multiple layer names, multiple results will be returned. Aside from adding the option to reference full layer names only, one could add a filter on the results to drill down on what they are looking to reference. In the example below I used “Get Rhino Attributes” to return the full layer name and then use that to drill down on what to select.
Ultimately I would urge the use of key/value pairs on rhino objects to help with referencing and filtering or at the very least different layer names, but often enough you may have a file that comes from someone else that you need to work with and some downstream filtering often does the trick by adding an extra layer of control.