Attempting to make a script to move an object a set number of units away from another object

I am trying to figure out how to write a script to move one object a specified distance away from another object but I cant quite figure out how to do it.

I am very green to scripting and figured this would be a good start to challenge myself but I am getting stuck.

this original

moving it 10inches away

Hi @brandon.fortier,

Using Python with rhinoscriptsyntax makes this pretty easy.

import rhinoscriptsyntax as rs

def main():
    id = rs.GetObject("Select object to move 10 units in the X-axis direction")
    if id:
        rs.MoveObject(id, [10.0, 0.0, 0.0])

if __name__ == '__main__': 
    main()

– Dale

thanks for the help @dale !