Setting Save As Options

Hi,

Is there a way to set the save as options using either Rhinoscript or Rhino API? Specifically interested in making sure “Save Textures” is checked when saving a file.
Rhinoscript SaveFileName does not appear to have any ability to set options? I’m using Rhino 6 with Python.

Eric

Hi @eric.bunn,

if you script _-Save or _-SaveAs using rs.Command() you should get the option _SaveTextures.

_
c.

1 Like

Thanks Clement,

That worked for me. I put together the following function:

import rhinoscriptsyntax as rs

def saveAs3dm(ver=6,small="No",geometry="No",saveTex="Yes",savePlug="No",browse=True):
    """rs.Command("_-SaveAs Version=6 SaveSmall=No GeometryOnly=No SaveTextures=No SavePlugInData=Yes Browse")"""
    ver = "Version=" + str(ver)
    SaveSmall = "SaveSmall=" + small
    GeometryOnly = "GeometryOnly=" + geometry
    SaveTextures = "SaveTextures=" + saveTex
    SavePlugInData = "SavePlugInData=" + savePlug
    if browse:
        cmdString = "_-SaveAs " + ver + " " + SaveSmall + " " + GeometryOnly + " " + SaveTextures + " " + SavePlugInData + " " + "Browse"
    else:
        cmdString = "_-SaveAs " + ver + " " + SaveSmall + " " + GeometryOnly + " " + SaveTextures + " " + SavePlugInData
    rs.Command(cmdString)
    
    
saveAs3dm(6,"No","No","Yes","No",True)

Eric