# ArrAxis Question for RotateObject - in Python

**URL:** <https://discourse.mcneel.com/t/arraxis-question-for-rotateobject-in-python/45063>\
**Category:** Scripting\
**Created:** [June 16, 2017, 7:51pm UTC](https://discourse.mcneel.com/t/arraxis-question-for-rotateobject-in-python/45063 "2017-06-16T19:51:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean\_Goldman](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dean_goldman/32/61210_2.png) [@Dean\_Goldman](https://discourse.mcneel.com/u/Dean_Goldman)\
**Post date:** [June 16, 2017, 7:51pm UTC](https://discourse.mcneel.com/t/arraxis-question-for-rotateobject-in-python/45063/1 "2017-06-16T19:51:37Z")

</div>

What is the proper syntax for choosing the ArrAxis in the context of rs.RotateObject?

My script is stuck producing the default Z-axis rotation, where I want to be able to control X and Y axis as well.

rotation\_x, rotation\_y, rotation\_z = random.sample(range(0, 360), 3)  
mesh = rs.RotateObject(mesh, center\_point, rotation\_x, **axis=“x”** , copy=False) # I have also tried using [1,0,0]

I have tried a variety of different ways. Does someone have the definitive answer?

Thank you!!

Here is the definition of RotateObject.  
[http://developer.rhino3d.com/api/rhinoscript/object\_methods/rotateobject.htm](http://developer.rhino3d.com/api/rhinoscript/object_methods/rotateobject.htm)

---

<div class="post-metadata">

**Author:** ![RIL](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/ril/32/768639_2.png) [@RIL](https://discourse.mcneel.com/u/RIL)\
**Post date:** [June 16, 2017, 8:16pm UTC](https://discourse.mcneel.com/t/arraxis-question-for-rotateobject-in-python/45063/2 "2017-06-16T20:16:06Z")

</div>

I think you need to provide a vector. Pehaps even a line would do the trick, but at least a vector would do (you can use the end points of a line to define a vector to provide as a parameter)

---

<div class="post-metadata">

**Author:** ![Dean\_Goldman](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dean_goldman/32/61210_2.png) [@Dean\_Goldman](https://discourse.mcneel.com/u/Dean_Goldman)\
**Post date:** [June 17, 2017, 9:07pm UTC](https://discourse.mcneel.com/t/arraxis-question-for-rotateobject-in-python/45063/4 "2017-06-17T21:07:38Z")

</div>

I believe the correct syntax actually is just [0,1,0] or [1,0,0], or some such vector. As far as I can tell, [0,40,0] works the same as [0,1,0]. But perhaps there are important differences depending on what you’re doing.

Example:

mesh = rs.RotateObject(mesh, center\_point, rotation\_x, [0,1,0], copy=False)
