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

    View.pick_helper dosen't work?

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 165 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.
    • thomthomT Offline
      thomthom
      last edited by

      When I try to use view.pick_helper in an onLButtonUp event it doesn't return any elements. It does return a PickHelper though which I can use to do a .do_pick(x,y) - but that doesn't allow me to set the radius.

      def onLButtonUp(flags, x, y, view)
        ph = view.pick_helper(x, y, 20)
        puts ph.count # > 0
      end
      

      Why doesn't it pick anything?

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        I noticed that once too, but found a work-around. I don't know if it is bad documentation or a missing feature.

        the test_point method allows an aperture (never tried it.) Also, maybe try passing an aperture to do_pick - I have never tried that either, but sometimes you find undocumented features.

        Otherwise, I find pick_helper methods confusing and get them working through trial-and-error.

        Hi

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          I'll poke about some.
          I guess this is one for the Typos and Questions thread - as well as the bug section. (Or has it been reported already?)

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          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