# How to copy/paste X, Y, Z coordinates in one step

Is there a way to copy and paste all 3 coordinates from the Properties (N) menu in 3d view? I can do it one at a time, but not all 3 at the same time.

• It is not possible to copy these in one step from the properties panel, perhaps you can say what you are trying to achieve, there might be another way. Oct 19 '13 at 16:55
• I do use xyz coordinates when I want a fine control over positon of objects related to each other. Usually I can also use mirror or move in these situations as well. Just was curious... Oct 19 '13 at 17:11
• Even so, if you were to copy all 3 coords in one step, the only use that could have in the way you described above is to have another object set to those exact coordinates. There are several ways of doing this. Oct 19 '13 at 17:15
• I think there was a script on cgcookie
– user320
Oct 19 '13 at 17:27
• I like to do it through coordinates because it helps me to think in coordinate system when I model. Just a personal preference. Oct 19 '13 at 17:28

For those using Blender 2.8, as of 2019:

1. First select the object you want to move
2. Select the object whose location you would like to copy
3. Then press Shift + S
4. Choose Selection to Active.
• Is the English wrong, or is my understanding of English bad? Jun 27 '20 at 17:43

Try the following steps:

1. Select the object(s) you want to move (the one you'd be "pasting" coordinates to).
2. Shift+Select the object with coordinates you want to copy, making it the Active Object.
3. In the 3D View's Properties region (N), right-click any one of the Location coordinate fields and choose Copy to Selected from the menu that appears
4. All selected objects will have the same location as the active object. This also works for scale and rotation.
• A related trick of changing all values at once is to click and drag down from the top location coordinate to the bottom, and then change all values (they must be equal). Great for setting all of them to 0 for example. It works also for rotation and what not. Jul 10 '17 at 7:31
• Meanwhile in blender 2.79 you can "Copy all to selected" from the RMB menu making this even more effective. Dec 3 '17 at 9:53
• Clicking and dragging doesn't seem to work for me. Jan 10 '21 at 4:03

Not exactly one step, but close, using Python scripting - in Python Console, first paste the following script, which uses the xsel program (Linux) to manipulate the clipboard (for more on the complications of piping into xsel, see Getting os.system to work in Python Console?):

import os, subprocess, shlex
def getCurSelLoc():
print(bpy.context.active_object)
mydat = str(bpy.context.active_object.location)
# os.system("echo '%s' | xsel -b" % mydat) # nowork, see:
# https://blender.stackexchange.com/questions/16329/getting-os-system-to-work-in-python-console
# also, cannot use stdin=mydat: AttributeError: 'str' object has no attribute 'fileno'
p1 = subprocess.Popen(shlex.split("echo '%s'" % mydat), stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p2 = subprocess.Popen(shlex.split("xsel -b"), stdin=p1.stdout)
out, err = p2.communicate()
print(out, err)
print(mydat)


... and press Enter twice to have it parsed; then, with (say) the default Cube selected, type or paste in the Python Console getCurSelLoc():

>>> getCurSelLoc()
<bpy_struct, Object("Cube")>
None None
<Vector (0.0000, 0.0000, 0.0000)>


Clearly, you get the location and the name of the selected object in the Python Console - but if you "paste" in a text document after this action, then you would have <Vector (0.0000, 0.0000, 0.0000)> pasted as text.

After you've ran getCurSelLoc() in the Python Console once, it ends up in the command history, so re-running it is as easy as pressing Up arrow key to recall last command, and pressing Enter. This could probably be re-done to function as an UI script, but I'm not that well versed with that part for the time being.

• This looks really legit, and I'm familiar with Python, but I've never gotten scripting to work. Any tips where to start? Sep 14 '15 at 0:59