How can modify the order of scenes by Ruby API in Sketchup?

No method was found in the Ruby API to modify the order of scenes.


#add(name = nil, flags = PAGE_USE_ALL, index = self.size) ⇒ Sketchup::Page

The #add method is used to add a new Page object to the collection.

If index is given, it specifies the position in the page list that the new page is added. Otherwise the new page is added to the end.

Edit:
(BTW, you can find a move_page(pagename, new_index) method in my :eyes: MATRIX extension in this forum…)

1 Like

This has been reported in the API Issue tracker …

2 Likes

And we hope we will get it… :wink:

1 Like

Thank you.
The ‘add’ method is not applicable. I need to keep the persistent_id unchanged and can only wait for the official update

But then your Sketchup will also have to be replaced, because that won’t change in SU2021, that’s for sure. :wink: