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.each_pair{|k,v|puts"#{k} = #{v}"}}

None apply to saving…