Uncheck '.BAK' creation via Rhinoscript

When saving to a synched folder form the cloud, the ‘.bak’ file that gets created holds onto the checkout controls rather than the saved file. To get around this, we are making our standard to deselect the “Create backup (*.*BAK) files…” option in Options|Files. I would like to add this enforcement to the script we use to make sure everyone is using the same settings. Is there a way with Rhinocommon/Python/vbscript to change this setting?

Hi Sam - the Rhino Common stuff for that is here:
https://developer.rhino3d.com/api/rhinocommon/rhino.applicationsettings.filesettings

-Pascal

Hi Pascal,
Thanks for the quick response. Thanks for pointing me to the Rhino.ApplicationSettings.FileSettings.CreateBackupFiles in the RhinoCommon documentation. Is there a way for that property to be accessible from RhinoScript (where the rest of the standards enforcement is currently applied), or do I need to create a plugin for that? I don’t see CreateBackupFiles as a property available in RhinoScript Editor, and imports don’t seem to work there. What is the best way to access this property?
Thanks!

Hi Sam - RhinoCommon is accessible from Python or C# but not RhinoScript.

python example:

import Rhino

print(Rhino.ApplicationSettings.FileSettings.CreateBackupFiles)

Rhino.ApplicationSettings.FileSettings.CreateBackupFiles = False

print(Rhino.ApplicationSettings.FileSettings.CreateBackupFiles)

-Pascal

Thanks for this. I would like to have the script run at Rhino startup. What is the best way to do this? The option to run a script at startup under “RhinoScript” only allows for ‘.rvb’ type files. Is there a way to run a python file from a ‘.rvb’ file, or is there a better way?

The basic way is to create a Python script and store it somewhere, then create an alias like “DisableBakCreation” that has the full path to the script. Then simply put the alias in your startup commands. It will then run the script every time you start Rhino.