sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [ruby doc] Pages.selected_page=

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 493 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I Offline
      inio
      last edited by inio

      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 = page1

      Bugs

      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.

      1 Reply Last reply Reply Quote 0
      • T Offline
        todd burch
        last edited by

        I'll add this this evening. Thanks. Todd

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement