Hi! How can I disable autosave on Sketchup?
Uncheck Autosave in Window/Preferences/General. (Sketchup/Preferences/General on Mac).
OOPS - sorry. You want to know how to do it in Ruby. So my answer isnāt relevant, unless you can figure out how to call that menu command from Ruby. I believe itās possible, but canāt remember how.
Itās not accessible through the API.
Itās accessible in newer versions in C:\Users\USERNAME\AppData\Roaming\SketchUp\SketchUp 2019\SketchUp\SharedPreferences.json
and appears under the Preferences section as
āAutoSaveā: true, or āAutoSaveā: false,
BUT changing that file has no immediate affect, AND it gets rewritten back as it was set in SketchUp as SketchUp closes anyway !
You simply need to advise users of your tool to switch AutoSave off manually in Preferencesā¦
PS: Sketchup.send_action(ā¦) does not have any entries to do this - even in the PC only numerical code setā¦
PPS: There are several āoptionsā available to the model, somewhat shroudedā¦
Use this snippet to list them all, and their key/value:
Sketchup.active_model.options.each{|o|p o.name; o.each_pair{|k,v|puts"#{k} = #{v}"}}
None apply to savingā¦