Autosave skp

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ā€¦

3 Likes