Layer/Tag LAYER_HIDDEN_BY_DEFAULT not working

Hi
In my SketchUp extension I create a layer/tag which should be hidden or set to invisible by default. This has and still works in earlier SketchUp versions (for example in SketchUp 2017), but not in SketchUp 2020.
In SketchUp 2020 the layer/tag is set to visible after the extension created it.

Example code:
box_layer.page_behavior=(LAYER_HIDDEN_BY_DEFAULT | LAYER_IS_HIDDEN_ON_NEW_PAGES)

I looked in the API doc; there are no changes on this.

Is this a bug?

Greets Philipp

Sounds like a bug to me.

Yes I see this also. But it just a momentary glitch.

If you manually switch scenes and back again you’ll see the correct settings are applied across the scene page collection.

Testing shows that using code to set the selected page to itself triggers a scene view refresh as if the model was switched to another scene and then back again. This is fortuitous as the user will not see and ugly scene change. Ex …

pages = Sketchup.active_model.pages
pages.selected_page= pages.selected_page

I know it’s not intuitive (from the docs) but it works.

And I logged an issue for this …


Note that I tested (on Windows platform) and this bug is present in …

  • 20.0.363
  • 18.0.16975
  • 17.2.2555
  • 16.1.1449

… so it is an old bug.