• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Go to a particular page on a model

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 2 Posters 435 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.
  • C Offline
    confitex architure
    last edited by 5 Jun 2008, 15:54

    Hello,
    I'm trying to go and view to a defined scene with a script.

    model = Sketchup.active_model
    pages = model.pages

    and then

    pages.select, .view, .show... show_page, .activate, ...
    But did'nt succeed.

    What would be the solution? Jim? 😄

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 5 Jun 2008, 16:24

      
      ### Try something like this...
      model=Sketchup.active_model
      page_name="the_desired_page_name"
      the_page=nil
      pages=model.pages
      pages.each{|page|the_page=page if page.name==page_name}
      return nil if not the_page ### this stops endless loop if page not found...
      Sketchup.send_action("pageNext;") while pages.selected_page != the_page
      ### stops at desired page...
      
      

      TIG

      1 Reply Last reply Reply Quote 0
      • C Offline
        confitex architure
        last edited by 5 Jun 2008, 16:57

        Thanks TIG!
        I just found an easiest way on the forum.

        ...
        pages.selected_page = pages["Scene 2"]
        
        

        It was on an older post answered by Jim.
        http://www.sketchucation.com/forums/scf/viewtopic.php?f=180&t=8704&p=52285

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

        Advertisement