Programatically hide/restore the default tray from the API


is it possible to hide/restore the default tray programatically from the sketchup ruby API?

I notice when some of the trays are open the performance of some of the operations in my plugin dramatically fall. I could warn my users about this issue (so they could hide it manually), but It would be great if I could simply hide it programatically before those procedures take place and then restore it.

regards, Carlos

Unfortunately it is not really possible. You can show, but can not hide them…See:

How to make a simple Tray or roullOut in the sketchup? - Developers / Ruby API - SketchUp Community

The Sketchup::Model#start_operation have an ability to disable UI updates… (it could help in good part of the cases)


Hi dezmo,

Thanks for the answer!, I will try disabling UI updates, that might solve my issue.

Other solution could be to prevent the user with a warning message to hide the default tray before launching the operations, is there a way to programatically detect if the default tray is hidden or shown?

regards, Carlos

No. :frowning:

(See e.g. here: )

Thanks dezmo,

anyway disabling UI updates seems to work pretty well :). so it is even better this way

regards, Carlos