title: Getting, Storing, Setting and Modifying Transform Attributes through PyMel
body: <p>I'm working on something that gets and stores the transforms of an object moved by the user and then allows the user to click a button to return to the values set by the user.</p>
  
  <p>So far, I have figured out how to get the attribute, and set it.  However, I can only get and set once.  Is there a way to do this multiple times within the script running once?  Or do I have to keep rerunning the script?  This is a vital question for me get crystal clear.</p>
  
  <p>basically:</p>
  
  <pre><code>btn1 = button(label="Get x  Shape", parent = layout, command ='GetPressed()')    
  btn2 = button(label="Set x Shape", parent = layout, command ='SetPressed()')
  def GetPressed():
      print gx #to see value
      gx = PyNode( 'object').tx.get() #to get the attr
  def SetPressed(): 
      PyNode('object').tx.set(gx) #set the attr???
  </code></pre>
  
  <p>I'm not 100% on how to do this correctly, or if I'm going the right way?</p>
  
  <p>Thanks</p>