Layers Import function

Hello,
Is there an option to import just the layer structure from another Rhino file, excluding the objects? Similar to importing Cplanes, named views, etc., from other Rhino files. This would be a valuable and essential feature.

Thanks to @Helvetosaur. The script allowed me to import the layers from another file without the objects.

I also tried to make a script that allows you to select the layers you want to import. But I don’t understand scripts very well. It doesn’t work with sublayers. If anyone wants to continue I’ll leave the draft here.

LayersImportSelected.py (904 Bytes)

I would turn this into a wish as these script are difficult with sublayers, is there a request already somewhere? It would be a very useful function in Rhino.

if you need the exact same structure you could simply copy the file then delete all geometry and set it up as a template, or?

The need is for importing layer structures not only into blank files but also into files with other layers, objects, blocks, etc. already present.
Copy/Paste help, but if there are blocks, it’s a bit more difficult, it also imports the blocks and then you have to delete them. Maybe that’s ok, but the difficulty may lie in the empty layers. How do you import them?

i am not sure i understand, you have files from somewhere else that have to be embedded into the layer structure, or a layer structure that you want to embedd into a new file whatever. from my understanding you will have to do that manually anyway, even if you have a layer importer script/command, the objects dont know where they belong… maybe i am not getting it… i am ill after all today :flushed:

ok thinking a minute further, you have more empty layers that you did not need yet but might need later and you basically want to merge all the layers together… ok then this will not work with template…

well yeah, copying layers unfortunately only works when you have something on them. like a hidden point, block idk… sorry i cant help more than that.

No worriers, I really appreciate you taking the time to help me. Take care!

Yes, that’s it! But not always merging the whole thing. I’d like to be able for exemple to import just 45 layers (full and empty) from a file that has 100, into another file.

The best workaround I’ve found now for importing empty layers – but which forces me to import all the layers of the external file – is to insert the file as a linked block. With the active layer structure, and without reading the blocks in the file. Then I delete this linked block, and apparently the empty layers are there.

1 Like

Hey,

Hope this isn’t too late. I’ve written a script that imports layers from a .3dm file, automatically bringing in all the layers from the template Rhino file.

please find the scirpt here

Hi Pipouille -

The feature request is on the list as RH-31917 Open/Import selective

For the time being, there’s the undocumented test command ImportFrom3dmFile that might - or might not - do what you want.
-wim