How to create an scene with my section plane actived?d

I’m creating a script thats create 4 sections plane, each SP is looking for a different side.
I’m creating 4 scenes too, theses scenes is to turn the detailing process more easy as possible.

My script create the scenes as well, create the Sections Planes too, but doens’t activating the section on each scene.

# Função para criar uma cena com perspectiva desligada e vista traseira
def criar_cena_vista_traseira
  model = Sketchup.active_model

  # Define as configurações da nova cena
  scene = model.pages.add("Cena Vista Traseira")
  scene.camera.perspective = false

  section_plane = model.entities.find { |entity| entity.is_a?(Sketchup::SectionPlane) && entity.name == "C.03" }

  if section_plane
    section_plane.activate
    puts "Corte 03 ativado!"
  else
    puts "Section plane C.03 não encontrado."
  end

  view = model.active_view
  view.camera.set([0, 0, 0], [-1, 0, 0], [0, 0, 1])
  view.zoom_extents

  puts "Cena Vista Traseira criada!"
end

You need to update the scene page so it saves the section plane active state.

Also, be sure to set the scene page to save section plane state:

Please reassign category to the Ruby API subcategory.