It takes way less time to export multiple files objects in one command with automatic naming than it does to do so one by one. Anybody have a command or plugin for this?
I have these:
Choice of 4 standard mesh settings
BatchExportSTLByObjWSett.py (3.9 KB)
Fixed settings (need to edit the script to your desired settings)
BatchExportSTLByObjWFixedSettings.py (1.8 KB)
I also have scripts for exporting by layer and by object name if needed.
Nice, thanks. I’m going to try to work these out. I typically move all export models in 3dm format to 4 specific layers, I have a macro that auto-selects those layers and runs mesh repair on them, and then after that I’m going to see if I can place it in the script to autorun. Thanks!
Morning, @Helvetosaur Would you happen to have that script for exporting selected (or even All) objects as individual rhino files?
At the moment, I have a bunch of imported Rock Meshes I’d like to export to files.
Thx as always
EDIT: There’s this, but it doesn’t seem to SEPARATE the objects into individual exported files.
I have this maybe…
BatchExport3dmByObject.py (1.5 KB)
Make sure you use SplitDisjointMesh before exporting, what you think are many separate mesh objects could in fact be only one Rhino object and thus will be exported as only one file.
Thanks so much, will give it a shot right now!
EDIT: This is great. It did export individual rhino files per object.
QUESTION: I have multiple meshes I’ve batch-renamed as Rock1-Rock9, though I could have a whole bunch more at some point. So, couple of neat ideas for Export Naming Options if you ever think they’d be a worthy addition to this super helpful script:
- Current ObjName
- Edited ObjName
- Bonues Idea…Edited ObjName-in-series (i.e., if I have an asset folder with 49 “Rocks” in it, and I’d like to Export the Rocks from my current Rhino project starting as “Rock-50” and going to “Rock-n” for as many objects as I’m exporting)
There is this:
BatchExport3dmByObjectPlusNames.py (1.7 KB)
Exports one Rhino file per object selected, export folder is same as current folder if file has been saved; otherwise, choice of file name/location. Named objects get object name as main filename, unnamed objects get filenname "Unnamed-N" where N is a sequential number.
Not sure about “Edited ObjName”
This could be managed - could ask the user for a main file name and a starting number…
Thanks, let me give it a shot after I get something out the door by 11A
I’m using Grasshopper and Elefront to export loads of parts into separate files
I think it would be nice to have the option of whether to use the filename or not, along with the obj name, etc. Sometimes you just want to export a piece of geo as a general reusable asset.
There’s another script I use for something else that lets you select the order of filename nomenclatures (i.e., “FileName”; “ObjectName”; “Number”…) And it leaves off any options you don’t select. This could be a really helpful way to name the exported files in this type of tool.
Could even have a “Category” option in which you could enter a Custom phrase to categorize the Asset and make it searchable in folders.The final exported file could be something like:
Desert_Rock-1 (to be filed as a reusable asset)
AbandonedHouse_Ext_Desert_Rock-1 (to be filed within the hierarchy of the current working file)
I know it’s not me doing the work here! But I figure input can help make a better tool for all, along with all the other tools you’ve been nice enough to create and share…
Hi @Helvetosaur ,
Do you have also the same script but export to .iges?
How could i modify a script by myself?
No, I don’t have an IGES export in my library, but it’s not too hard to make… As there are a whole bunch of export scripts - what are you looking to do? Export each selected object as a separate iges file? How do you want to name the files?
You can, if you know a little scripting… the hardest part is setting up the export command string that it exports correctly. IGES can use different schemes - if nothing is scripted at the command line, it will use the most recent scheme choice or default if you have never chosen anything.
Yes I’m looking to export each selected object in separate iges file (default setting), name the files as the name of the object…
Thank you @Helvetosaur !!
Try this one out and see if it meets your needs:
BatchExportIGESByObjectPlusNames.py (1.4 KB)
Edit - note I did not make any provision for multiple objects with the same name in the file, in that case the files will automatically get overwritten and only the last one will be there. There are ways to handle this, but it’s a bit of work.