Save 3dm file with python

Using rhino python, I want to save the current model with a filename that I create. Any ideas?

Hi Colin, you might try attached, tested on windows… (330 Bytes)


Thanks Clement. I am using a Mac and this almost works, but as soon as the space is encountered the command gets executed.


_-SaveAs “test.3dm”

results in a save file dialog (with Untitled.3dm as the default filename) followed by an error: "Unknown command: “test.3dm”

How to pass an argument to the SaveAs command?

Try a set of single quotes around the command.
’_-SaveAs “test.3dm”’


Hi Colin, on Windows it can be passed before the filepathname eg.:

_-SaveAs _Version=4 _SaveSmall=_Yes _SavePluginData=_No "D:\Temp\Untitled.3dm"

Seems to work differently on a mac, in the script i got the chr(34) to force the quotes.



just to make shure, i guess you must define a proper file path, only the filename is not enough.


Thanks for all the suggestions. I came across a thread in these forums indicating that this feature is not yet fully implemented on a Mac. Guess I will have to wait…