[ruby doc] Pages.selected_page=
-
Add the following currently undocumented method to the Pages class
@unknownuser said:
selected_page=
The selected_page= method is used to change which page is selected
Syntax
selectedpage = pages.selected_page = page
Arguments
page - the page to select
Return Value
selectedpage - the newly selected page
Example
model = Sketchup.active_model
pages = model.pages
page1 = pages.add "Page 1"
page2 = pages.add "Page 2"
// default behavior - page 2 will be selected, select page 1 instead
pages.selected_page = page1Bugs
Selecting a page succeeds regardless of the appropriateness of the Page to the Pages object. The Page will be selected in it's model even if selected_page= is called on the Pages of another model.
-
I'll add this this evening. Thanks. Todd
Advertisement