Get last image export settings?
-
Sketchup seems to persist image export settings, such as width/height, file format, antialias. Is there a way I can grab these settings?
-
The registry:
HKEY_CURRENT_USER\Software\Google\SketchUp8\Preferences
-
Brilliant! Thanks
-
FYI... I have a bug issue logged that
Sketchup::read_default()
cannot return DWORD values.Basically the method assumes anything you want to read was written with
Sketchup::write_default()
, which inspects objects into evaluatable strings before storing them.So..
Sketchup::read_default()
is stupid and always tries to run the stored values back through Ruby'seval()
without Type checking. When a error occurs it seems the method'srescue
block just returnsnil
.So you'll need to use the
WIN32OLE
class ("win32ole.so" file,) and the Windows Scripting Host interface to read registry values.
See: [Plugin Library] Win32API and Win32OLE so files
Advertisement