Suppress/remove/eliminate/hide multiple export dialogs

I am trying to find a way to do an export with only the first dialog box.
When I type the Export command in, currently I get:

  1. “Export” dialog box where I can type the filename, choose a format and some options and click Export or hit return.

  1. “STL Mesh Options” then comes up. I click Ok or hit return nearly all the time.

  1. “STL Export Options” comes up. I click Ok or hit return nearly all the time and it finally exports, after two usually superfluous clicks.

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.

Hi Makoceros - the way to do this is to use the dash version of the Export command in a macro -

! _-Export _Pause _Browse _Enter _Enter _Enter

The dash in front of the command suppresses the dialogs - the Browse option unsuppresses one of them of course.


1 Like

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.


Hi Mitch.
An export script would be very important to me.
These are the .stl parameters that I use frequently. The destination folder may change though …


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. (2.8 KB)

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…

HTH, --Mitch

Hi Mitch.
Excellent. Thank you. I’ll try it in the next few days.

It is possible to modify this script to save as DXF files? Will be very useful for my needs as requested here:

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.


Thank you for reply.

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. I need to test your script to see how it’s working.

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. (1.8 KB)


1 Like

hi Pascal,
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:

Then click the “+” to make a new alias and enter it in:

I still wonder how one can link a text command/alias to a (possibly much longer) macro saved in a file. I saw this but for me the readcommandfile does not execute, just opens.

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.

hi Mitch,
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…

  1. 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

  2. Drop the python script file into the scripts folder

  3. 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.

  4. That’s it. When you type your alias and enter, the script should run.


Your script it is working well. Thank you very much.