# Scale tool

**URL:** <https://forums.sketchup.com/t/scale-tool/112348>\
**Category:** Developers\
**Tags:** advice\
**Created:** [December 26, 2019, 8:39am UTC](https://forums.sketchup.com/t/scale-tool/112348 "2019-12-26T08:39:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pupoksveta](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/pupoksveta/32/116495_2.png) [@pupoksveta](https://forums.sketchup.com/u/pupoksveta)\
**Post date:** [December 26, 2019, 8:39am UTC](https://forums.sketchup.com/t/scale-tool/112348/1 "2019-12-26T08:39:15Z")

</div>

hi there,  
i want to ask if how to activate scale tool with ruby when component is placed. is there snippet that can be used to activate scale tool automatically after component placement?  
thanks a lot Miroslav

---

<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 26, 2019, 3:04pm UTC](https://forums.sketchup.com/t/scale-tool/112348/2 "2019-12-26T15:04:10Z")

</div>

> **[Class: Sketchup::ModelObserver](https://ruby.sketchup.com/Sketchup/ModelObserver.html#onPlaceComponent-instance_method)**
>
> This observer interface is implemented to react to model events.

Examples:

```auto
# This is an example of an observer that watches the
# component placement event.
class MyModelObserver < Sketchup::ModelObserver
  def onPlaceComponent(instance)
    puts "onPlaceComponent: #{instance}"
  end
end

# Attach the observer.
Sketchup.active_model.add_observer(MyModelObserver.new)

```

> **[Module: Sketchup](https://ruby.sketchup.com/Sketchup.html#send_action-class_method)**
>
> The Sketchup module contains a number of important utility methods for use in your Ruby scripts.

```auto
result = Sketchup.send_action("selectScaleTool:")

```

---

<div class="post-metadata">

**Author:** ![pupoksveta](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/pupoksveta/32/116495_2.png) [@pupoksveta](https://forums.sketchup.com/u/pupoksveta)\
**Post date:** [December 26, 2019, 4:19pm UTC](https://forums.sketchup.com/t/scale-tool/112348/3 "2019-12-26T16:19:09Z")

</div>

> [@dezmo](#):
>
> class MyModelObserver \< Sketchup::ModelObserver def onPlaceComponent(instance) puts “onPlaceComponent: #{instance}” end end

thanks , sometimes to find things is too complicated for me. thanks again
