I’d like to eliminate #2 & #3 somehow, at least for 95% of the exports I do.
Is there anyway to set them as defaults or otherwise hide them?
I googled, checked the docs and searched the forum and didn’t find anything.
I do a lot of exports and it’s gets annoying to have to just click through those two dialogs.
Sorry if this the solution is really obvious…I couldn’t find it.
It’s also possible to have a script to export an .stl directly with specific settings. If you have a few settings you use frequently, this can be quite useful, as it’s a one click export. I have some script models here if you need.
OK, you can try this one on for size… It exports all selected objects in a single .stl file, with a collection of fixed settings that you can modify in the script. It is currently set to use the current file name and folder if your .3dm file has been saved and named, otherwise it will ask you for a file name and folder. I could also re-write it to always ask for a name and folder.
I set up the script according to your image above, it therefore only sets the max. distance setting to .005. If you want to modify any of the other settings, open the script in a text editor and at the very bottom of the script, there is a settings list that you can change:
Just change the values inside the brackets, for example if you want an angle setting, change the first position from 0 to some angle, or if you want “Simple planes” change the last argument to 1 (means “Yes”).
I only tested this lightly on Mac… I also have other .stl export scripts that create separate files for each object or layer if you need…
Certainly. The complicated part with DXF/DWG export is specifying what scheme to use, but if you are certain you know the exact name of the scheme and that it is present on your system, that should be OK. I note from your request that you just want to change the file name, but what about the folder in which it is saved? Same folder as the original?
I also have various “batch” export scripts that save files by layer or by object.
I know the name of the dxf export scheme I want to use as I created a custom one adapted to my specific needs. I called “R12N”.
Will be great to be able to choose also the folder where to save and all the subsequent saves to be made into the same folder, I mean to remember the last used folder where I saved the first dxf.
Usually I’m saving in one dxf file multiple curve shapes that are on multiple layers and I need to retain the original layer names. So if I can define somehow that an “object” it is actually comprised of multiple curves then will be good. If you want to share your scripts I can give them a try to see if something fits on my workflow.
What I would suggest in this case is that it defaults to the last-used folder for the save each time - which you can accept with a simple Enter, but also gives you an option to change it by browsing elsewhere. Otherwise, it gets complicated, as if you want to change folders later, you can’t…
OK, here is a first attempt… If you do not pre-select your objects, you will have a command line option to browse for a new folder, if you choose yes, you will get the “browse for folder” dialog. Otherwise, it will remember the last-used folder during the session, if objects are pre-selected before running the export, it will use that folder automatically without asking. There is also a file-overwrite protection, if you repeat the same name in the folder, it will ask you if you want to overwrite or not.
Thanks a lot. That gets me about 90% of the way there. I am trying to figure out what command option will set the file format–by default it’s 3dm and I want .STL. The documentation has not been very helpful. I only needed two _Enter’s, not three,. This worked fine for me: ! _-Export _Pause _Browse _Enter _Enter
I had a hard time “installing” the command since I thought I needed to save it to a file and access it somehow but finally saw I could just make an alias for it. In case anyone else is wondering how that’s done:
Rhinocerous menu / Preferences (on a Mac) / Aliases:
But mainly, does anyone know the option, if there is one, to set the export format to STL, without making a (Python) script? I could make the script if need be but as mentioned, I have no idea how to tie that to a text/alias command I can type in Rhino.
Thanks for the suggestion. I’m aiming for the simple macro first if I can find a way to set the file format as a command option. I’m not clear on how to tie a script to an alias and the documentation hasn’t been very enlightening so far.
You can’t (as far as I know). One of the shortcomings of Rhino, the only way to set a file type via a macro is by passing the full file name plus the extension. Hence the script…
Locate the “scripts folder”. It is in a hidden directory: ~/Library/Application Support/McNeel/Rhinoceros/Scripts
“Library” is a hidden directory on the Mac. To get to it: Pull down the Go menu and then press the Alt key. You will see Library magically appear in the menu. From there, expand along the path above until you get to the Scripts folder
Drop the python script file into the scripts folder
In Preferences>Aliases, create a new alias, and in the path portion simply put: ! -_RunPythonScript "scriptfilename"
where scriptfilename is the actual name of the script file you just dropped in. You don’t necessarily need to include the .py at the end, but it won’t hurt. Do enclose the file path/name in quotes, just in case it has spaces in it.
That’s it. When you type your alias and enter, the script should run.