sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Getting an active page

    Scheduled Pinned Locked Moved Developers' Forum
    9 Posts 4 Posters 254 Views 4 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.
    • fuzzybroF Offline
      fuzzybro
      last edited by

      There is no method like model.active_page and PagesObserver doesn't return a 'page' object on the onContentsModified(pages) call. So, is there a way to get the active (selected) page from the API?

      V.

      [OctaneRender for SketchUp Overview and Demo Version(http://sketchucation.com/click.php?url)]

      Latest updates, tutorials and artwork
      facebook.com/octane4sketchup

      1 Reply Last reply Reply Quote 0
      • jiminy-billy-bobJ Offline
        jiminy-billy-bob
        last edited by

        http://www.sketchup.com/intl/en/developer/docs/ourdoc/pages.php#selected_page

        25% off Skatter for SketchUcation Premium Members

        1 Reply Last reply Reply Quote 0
        • tt_suT Offline
          tt_su
          last edited by

          Don't you just love the consistency of the API? πŸ‘Š

          1 Reply Last reply Reply Quote 0
          • jiminy-billy-bobJ Offline
            jiminy-billy-bob
            last edited by

            Haha, yeah πŸ˜„

            25% off Skatter for SketchUcation Premium Members

            1 Reply Last reply Reply Quote 0
            • fuzzybroF Offline
              fuzzybro
              last edited by

              Hah, nice πŸ˜„
              Thank got this method is even exist πŸ˜„

              Thanks a lot!

              [OctaneRender for SketchUp Overview and Demo Version(http://sketchucation.com/click.php?url)]

              Latest updates, tutorials and artwork
              facebook.com/octane4sketchup

              1 Reply Last reply Reply Quote 0
              • Dan RathbunD Offline
                Dan Rathbun
                last edited by

                @tt_su said:

                Don't you just love the consistency of the API? πŸ‘Š

                Actually.. thinking a bit. The naming is correct.

                Why? Because you often are animating (in transition,) between two scene pages. After the first frame, you still are nowhere near being "in" the selected (target) page.

                Someone might argue that, once animation begins, there really is no active_page. (Ie, you are somewhere in limbo between the previous page and the target page.)

                I'm not here much anymore.

                1 Reply Last reply Reply Quote 0
                • jiminy-billy-bobJ Offline
                  jiminy-billy-bob
                  last edited by

                  Dan, I think TT meant this :

                  model.active_layer
                  model.materials.current
                  model.pages.selected_page

                  So much for consistency

                  25% off Skatter for SketchUcation Premium Members

                  1 Reply Last reply Reply Quote 0
                  • tt_suT Offline
                    tt_su
                    last edited by

                    @jiminy-billy-bob said:

                    model.active_layer
                    model.materials.current
                    model.pages.selected_page

                    Don't forget model.styles.selected_style πŸ˜’

                    1 Reply Last reply Reply Quote 0
                    • Dan RathbunD Offline
                      Dan Rathbun
                      last edited by

                      I know what he meant.. my arg still stands.

                      Sometimes "active" is appropriate.. other times "selected" is more appropriate. Still other times "current" may seem more appropriate.

                      There is a difference between the terms. They are not direct synonyms.

                      I'm not here much anymore.

                      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