Hello,
I’m having a problem with the “_-SaveSmall” command.
As I understand, it should prompt options, notably “Version”. In my case, it does not.
The goal here is to specify a Rhino file version to the “_-SaveSmall” command, in order to preserve the version in which the file was saved.
It is to be included in a Python batch script as:
import rhinoscriptsyntax as rs
file_rh_version = rs.ReadFileVersion()
savesmall = "_-SaveSmall _Version={} _Enter".format(file_rh_version)
rs.Command(savesmall)
eddi
January 7, 2022, 9:48am
2
ju_anoriant:
rs.ReadFileVersion()
@piac This method looks bugish, allways returns -1
It works with RhinoScript(rvb)
Interesting point, I also get the same result if I use RhinoCommon classes directly:
>>> import Rhino
>>> Rhino.RhinoDoc.ReadFileVersion(Rhino.RhinoDoc.OpenDocuments()[0])
-1
pierrec
(Pierre Cuvilliers)
January 7, 2022, 2:43pm
4
You can use the -SaveAs command instead, and ReadArchiveVersion:
import Rhino
import rhinoscriptsyntax as rs
file_path = rs.DocumentPath()
file_name = rs.DocumentName()
file_rh_version = Rhino.FileIO.File3dm.ReadArchiveVersion(file_path + file_name)
file_rh_major_version = int(str(file_rh_version)[0])
savesmall = "_-SaveAs _SaveSmall=Yes _Version={} _Enter".format(file_rh_major_version)
rs.Command(savesmall)
pierrec
(Pierre Cuvilliers)
January 7, 2022, 2:45pm
5
I’ve just tried what you suggested but to no avail (see screenshot).
The “_SaveSmall=Yes” argument is passed as the file path.
pierrec
(Pierre Cuvilliers)
January 8, 2022, 5:37pm
7
That’s strange, it’s a localization issue maybe? Can your try this command instead:
savesmall = "_-SaveAs _SaveSmall=_Yes _Version={} _Enter".format(file_rh_major_version)
It seems to be working as intended.
Thanks a lot!
brian
(Brian Gillespie)
September 8, 2026, 10:43pm
9
RH-66909 is fixed in Rhino BETA