[bug] Scene Tabs visible when reopening file

I prefer to disable the scene tabs for maximum workspace. I often don’t need them and manage my scenes differently.

There is a minor bug, at least in win7x64. When saving a file with the scene tabs disabled, they will be visible again at the next time you do a fresh start(!) of SketchUp. In the menu though, the scene tabs are not enabled so you have to go twice to menu → scene tabs to actually disable them again.

See image: freshly started SketchUp, opened a file where scene tabs were not enabled but still visible in screen.

This is the state of things as far back as SketchUp 2013, at least.

The scene tabs seem to be a per model setting. If you open a model with no scenes, the menu item will be greyed out (regardless of the check mark setting.)

When opening a model with scenes, they will always be shown, regardless of the global setting (as saved upon quit into the registry [".../Preferences/DisplayTabs"].)

Basically SketchUp is poor on the User global override controls (though some exist in “Window” > “Preferences”,) and very little are accessible via the SketchUp Ruby API. (For example, it would do no good to change the registry settings, as it is only read during SketchUp startup, and it would be overwritten upon SketchUp shutdown anyway.)
So we really cannot write a cross-platform extension to workaround this annoyance. (I might be able to use a Windows specific API hack, not sure yet.)

thanks for the explanation Dan. My hope is this could be a very easy bug to fix or…? Crossing fingers.
edit: you have some more info on the Windows hack?

This hack will work [WIN only - uses a VBS script].
Extract the two RB and VBS script files from the attached ZIP
Put them into your Plugins folder.
The RB loads as SketchUp starts and it waits 1.5 seconds before running the VBS script.
You may need to adjust its timer to suit your set up.
The VBS simulates keystrokes for Alt, then V[iew] then S[cene Tabs], unchecking the persistent scene tab display.
It’s a bit clunky - but I offer it as a proof of concept rather than a good solution…
WinNoSceneTabs.zip (428 Bytes)

I tested v8 32-bit, and the bug is there also. So it does not appear to be limited to a bitness build. Nor is it limited to only the startup of SketchUp. It occurs whenever a model file is opened.

The scene tabs are displayed, and the menu item checkstate can be out of sync, if it was previously unchecked, or just after startup and the historical setting in the registry was 0 (unchecked.)

Also, SketchUp 2014 has a bug, which does not write the registry setting at all, even though previous and later version do.

No version it appears honors the historical setting in the registry.

@DanRathbun, it’s the same situation on a mac, I don’t think it has ever worked outside of the session…

john

Thanks TIG, Interesting, never knew one can do stuff like this with VBS. Will try it.

We can also do the same with just Ruby,… no need to involve an external VBS file.
Also my solution will not use the Sendkeys insertion method.

1 year later, the same issue is still present in SketchUp 2017. Just a bump hoping it will end up on a to-do list of fixes for 2018…

I doubt they will ever change it, as I think it is by design…

it’s the simplest way to ensure anyone knows there are scenes in any given model…

when file sharing and downloading this must avoid a lot of support queries…

but, can’t you just add a app observer that checks for pages in your SU?

this works on a mac…

 # watch for scenes and turn off the Tabs
class MaxBSceneObserver < Sketchup::AppObserver
  def onOpenModel(model)
    mod = Sketchup.active_model
    scenes = mod.pages.count > 0
    if scenes
      Sketchup.send_action('togglePageTabsDsiplay:')  ## Scene Tabs
    end
  end
end

# Attach the observer
Sketchup.add_observer(MaxBSceneObserver.new)

personally, I don’t like observers and would be more inclined to have a shortcut for the .send_action

john

1 Like

Thanks John. Personally - I don’t like adding an observer just for this either so will hide it manually for now/ever.

Yep, just did a google search for this exact issue and I can say it is still happening in S.U.2020 (on a Mac). cheers.