Finding active section planes in a scene

Good news, SketchUp 2026.0 has implemented:

So going forward we no longer need to transition to a page (or each page) to find which of the section planes are active.


With regard to API tracker issue # 25
See what scenes a section is used in · Issue #25 · SketchUp/api-issue-tracker

# See what scene pages where a section is active. (SU2026+)
#
# @return [Array<Sketchup::Page>] The list of scene pages that the given
#  SectionPlane is active on, or empty if the section is unused on any page.
def pages_active_on(section)
  unless section.is_a?(Sketchup::SectionPlane)
    fail(TypeError,"SectionPlane expected for <#{section.class}> argument.",caller)
  end
  section.model.pages.select do |page|
    page.active_section_planes.include?(section)
  end
end

@ene_su Does this snippet now satisfy tracker issue #25 ?
I.e., using page.active_section_planes.include?(section) within a select filter block upon the pages collection.


And in keeping with this new API feature, the SketchUp Extensibility Team has released an Example extension to purge unused section planes. (requires SketchUp 2026 or higher.)

See: