# How to move entity in local axis

**URL:** <https://forums.sketchup.com/t/how-to-move-entity-in-local-axis/146407>\
**Category:** Ruby API\
**Created:** [December 17, 2020, 11:23am UTC](https://forums.sketchup.com/t/how-to-move-entity-in-local-axis/146407 "2020-12-17T11:23:01Z")\
**Posts on this page:** 1\
**Showing post:** 6

<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 18, 2020, 1:55pm UTC](https://forums.sketchup.com/t/how-to-move-entity-in-local-axis/146407/6 "2020-12-18T13:55:18Z")

</div>

> [@hamedpanahi125](#):
>
> but how can i move it 50 unit along x axis for example

Please Read:  
[[How to] Post correctly formatted and colorized code on the forum?](https://forums.sketchup.com/t/how-to-post-correctly-formatted-and-colorized-code-on-the-forum/46189)

```ruby
model = Sketchup.active_model
sel = model.selection[0]
tr = Geom::Transformation.translation([50,0,0])

sel.transform!(tr)

```

There is also a trick that the `#transform!` methods take objects that can be [coerced](https://www.merriam-webster.com/dictionary/coerce) into a transformation, like an array with 3 numeric elements. Ie …

```ruby
sel.transform!([50,0,0])

```

---

_[View the full topic](https://forums.sketchup.com/t/how-to-move-entity-in-local-axis/146407)._
