Changes to Ruby model in SK V2021 from earlier versions?

Not sure where to ask this question hope this will do?
Seems that SK V 2021 has changed the Layers name to Tags is this correct?
Does this affect the Ruby object model significantly?
Are there any other significant changes - or better still is there a list of version changes - yes I did go looking couldn’t find it… sorry.

I think so. :slight_smile:

Almost. The changes were made a version earlier (in SU2020.)

Yes and no. They try to make as much as possible compatible with old version, but some new features are there.
You can check it e.g. here:
As of SketchUp 2020 “Layers” were renamed to “Tags” in the UI. The API retains the use of “Layer” for compatibility and is synonymous with “Tag”.

https://help.sketchup.com/en/release-notes/sketchup-desktop-20210

Thanks dezmo very helpful. I was using SU2018 up until recently - new computer, now moving to 2021 and want to do some more ruby programming stuff.

In the API ‘layers’ retain that name, despite being recast as ‘tags’ in the main user-interface…
Much the same as the API uses ‘pages’ which were renamed ‘scenes’ long ago…

Thanks TIG - useful info. Yes I couldn’t see Tags in the docs anywhere.

Super… thanks Dan. It’s taking me a while to navigate the documentation to find all the stuff I want now that I have committed to SU2021.

The API typenames remains the same. We tried to minimize breaking changes.

What will impact you if you deal with layers/tags is if you need to solve the visibility of a drawing element. Since now you need to take into account the visibility of the parent tag folders.

However, we added a new method to aid with this in SU2020.0 when we split Hidden Geometry into Hidden Geometry and Hidden Objects; model.drawing_element_visible?(instance_path)

Class: Sketchup::Model — SketchUp Ruby API Documentation

Also, if you used the LayersObserver to respond to layer interactions you probably want to also listen to the new folder related events.