algorithmic modeling for Rhino
I like to reference 3dm files and create something like an assembly.
The reference 3dm component has a layer filter, but what if I forgot how all the layers in my referenced files are named? Is there a way to create a layer table of a referenced 3dm file?
When connecting a value list to fabtools text component font input, you automatically get a value list with all the fonts available. I wish to have the same option when referencing 3dm files.
Tags:
Hi Martin,
Human has a component called LayerTable that returns all layer names (and child layer names too) in the rhino file.
I'm looking for a layer table of a referenced 3dm file, not the active rhino file...
Ah, hmm, sorry for misreading that. The (Rhino.FileIO.) File3dm type has a Layers property, you could tap into that.
This is the example Pieter mentioned.
It requires ghpython plugin installed.
Perfect. I think I need to learn more python! Thanks
Actually, I just realized Rhino.FileIO layer creates a layer list with no information whether one of the layers is a sublayer.
Any ideas how to create full layer names?
Hi Martin.
By "create full layer names" you mean path of the layer ("Layer 02::subLayer02::subSubLayer02)?
In theory you just need to call the "FullPath" property, but for some reason it does not work. I will attach the file so that Giulio or somebody else could tell us why it does not work properly.
Yes, I meant full path.
Looking at the Import 3DM component, it does not support full paths either.
When referencing files, I think it would make sense to have the opportunity to use full path layer names as layer filters. Otherwise you'd need to name sublayers ?bijective?
Welcome to
Grasshopper
© 2025 Created by Scott Davidson.
Powered by