# PickHelper pick outside context

**URL:** <https://forums.sketchup.com/t/pickhelper-pick-outside-context/145557>\
**Category:** Ruby API\
**Created:** [December 9, 2020, 2:00pm UTC](https://forums.sketchup.com/t/pickhelper-pick-outside-context/145557 "2020-12-09T14:00:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guy](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/guy/32/88_2.png) [@Guy](https://forums.sketchup.com/u/Guy)\
**Post date:** [December 9, 2020, 2:00pm UTC](https://forums.sketchup.com/t/pickhelper-pick-outside-context/145557/1 "2020-12-09T14:00:55Z")

</div>

Is there a way to pick objects outside the context once you are inside a group or component?

---

<div class="post-metadata">

**Author:** ![dezmo](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/dezmo/32/51058_2.png) [@dezmo](https://forums.sketchup.com/u/dezmo)\
**Post date:** [December 9, 2020, 2:22pm UTC](https://forums.sketchup.com/t/pickhelper-pick-outside-context/145557/2 "2020-12-09T14:22:41Z")

</div>

Looks like, not really. However `InputPoint` can do something… 🤔

```ruby
class TestToolPH
  def activate
      @ip = Sketchup::InputPoint.new
  end

  def onMouseMove(flags, x, y, view)
    @ip.pick(view, x, y)
    ph = view.pick_helper
    ph.do_pick(x, y)
    view.tooltip = "ph:#{ph.picked_edge}\nip :#{@ip.edge}"
    view.invalidate
  end
end
Sketchup.active_model.select_tool(TestToolPH.new)

```

![image](https://global.discourse-cdn.com/sketchup/original/3X/6/4/642c62a6b7e701eada99fc42f78b1eb1baeb7c02.png)

![image](https://global.discourse-cdn.com/sketchup/original/3X/a/e/ae084bd167e4c63fa4844ba9bcc1a962484a57bd.png)

---

<div class="post-metadata">

**Author:** ![DanRathbun](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/danrathbun/32/500_2.png) [@DanRathbun](https://forums.sketchup.com/u/DanRathbun)\
**Post date:** [December 9, 2020, 9:39pm UTC](https://forums.sketchup.com/t/pickhelper-pick-outside-context/145557/3 "2020-12-09T21:39:39Z")

</div>

… and you can compare [`InputPoint#instance_path`](https://ruby.sketchup.com/Sketchup/InputPoint.html#instance_path-instance_method) to [`Model#active_path`](https://ruby.sketchup.com/Sketchup/Model.html#active_path-instance_method) to be sure that the pick is outside the current active edit path. ( **`nil`** means that nothing is yet picked.)
