# ArrAxis Question for RotateObject - in Python

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

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)

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)