I need to select layers, both unlocked and locked, and export all objects on those layers and sublayers, including locked and hidden objects,as a .3dm file with the layer structure retained. I need to create files with portions of the model.
I’ve seen assorted scripts for this. Is there one which does exactly what I need, including locked layers and sublayers, and locked and hidden objects?
Could this be added to list to either be an option in Export, or a new Rhino command?
@stevefuchs Thanks for the response. Your suggestion is exactly what I’ve been doing, but I don’t like it because of the risk of deleting from the wrong file, etc. I’ve had one incident which I managed to recover from.
So back to my request:
I need to select layers, both unlocked and locked, and export all objects on those layers and sublayers, including locked and hidden objects,as a .3dm file with the layer structure retained. I need to create files with portions of the model.
Could this be added to list to either be an option in Export, or a new Rhino command?
Isn’t this something that can be addressed with a naming convention or how you set up your file system? How many times are you exporting parts of the whole file?
These type of specific export tools are perfect for a custom python script you can build with Claude.
For example I made one that exports by layer, with a default list based on what layers are currently on, but allowing me to override that list with checkboxes on a list of layers (I think it makes an ETO form). And it tells me how many objects per layer are exporting and how many objects are ignored. Because in my case only meshes export as STL. And only Nurbs export at step.
You can try to describe what you want as an initial prompt and try it until it works the way you want. It usually takes 10+ takes until you reach a script that does what you want, but it’s pretty powerful.
@gustojunk Thanks for the reply. Essential to my request is to export all objects on selected layers and sublayers, including locked and hidden objects. The destination needs to be a .3dm file.
No need for anything more complex. If it can be easily scripted using Claude then it should be simple for McNeel to add it to Rhino.
The fundamental problem idifficulty in doing what I requested is Rhino apparently does not have a method for selecting objects which are hidden or on locked layers. I have my doubts that Claude can create such a method.
If you’re not used to programming (which, by the looks of it, might be the case), I’d suggest being a little more optimistic about what code can achieve.
You’re essentially saying it’s not possible because no method exists. By that logic, not even the Rhino developers could achieve it. If they can, so can Claude or any other AI.
Also, there is no need for a dedicated method. You can create your own, after all, a method is essentially just a packaged piece of code.
And sometimes things can be done differently than you imagined. For instance, the script could find all objects, temporarily unlock and unhide them, export what it needs, and then lock and hide the ones that originally had those properties again. Pretty simple.
Lastly, it looks like quite a custom tool, so I’m not sure why you’re seem so fixated on having Rhino developers implement it just for you in a piece of software used by hundreds of thousands of people.
Export Scope: Only objects on the explicitly selected layers are exported. Sublayers and objects on sublayers are not included unless those sublayers are directly selected as well.
Hidden / Locked Objects: Hidden objects are automatically excluded from the export.
Output Format: A separate file is created for each individual layer.
Additionally, here are two useful commands you might want to try alongside this workflow:
ImportFilesinFolder: Automatically imports multiple files from a designated folder at once.
MergeLayers: Merges multiple layers into a single layer.
This does not meet my needs: I need to select layers, both unlocked and locked, and export all objects on those layers and sublayers, including locked and hidden objects,as a .3dm file with the layer structure retained.