title: Abaqus print coordinates of output database
body: <p>I am working on an Abaqus python model and I want to print coordinates of some nodes in the output database using the following code;</p>
  <pre><code>SetsScrewsLeft, SetScrewsRight = [], []
  
  # Define list with with partnames
  PartNames = [&quot;C7&quot;, &quot;T1&quot;, &quot;T2&quot;, &quot;T3&quot;, &quot;T4&quot;, &quot;T5&quot;, &quot;T6&quot;, &quot;T7&quot;, &quot;T8&quot;, &quot;T9&quot;, &quot;T10&quot;, &quot;T11&quot;, &quot;T12&quot;,
               &quot;L1&quot;, &quot;L2&quot;, &quot;L3&quot;, &quot;L4&quot;, &quot;L5&quot;, &quot;S1&quot;]
  
  for q in range(len(PartNames)-1):
      SetsScrewsLeft = [&quot;Screw[&quot; + PartNames[q] + &quot;_L']&quot;]
      print(SetsScrewsLeft)
  
  # Create lists to write data to
  xcoord_s1, ycoord_s1, zcoord_s1, nodelable = [], [], [], []
  NL1, NL2, NL3 = [], [], []
  p1_s1, p2_s1, p3_s1 = [], [], []
  
  # Open output database
  odb = session.openOdb('JobSpine4.odb')
  
  # Look at results for last frame
  lastFrame = odb.steps[StepName1].frames[-1]
  
  # Select type of output. U = displacement
  displacement = lastFrame.fieldOutputs['U']
  center, centerDisplacement = [], []
  
  for j in range(len(SetsScrewsLeft)-1):
  # center = odb.rootAssembly.nodeSets[NodeSets[j]]
      center = odb.rootAssembly.nodeSets[SetsScrewsLeft[j]]
      centerDisplacement = displacement.getSubset(region=center)
  
      for v in centerDisplacement.values:
          nodelable.append(v.nodeLabel)
          xcoord_s1.append(v.data[0])
          ycoord_s1.append(v.data[1])
          zcoord_s1.append(v.data[2])
  
      # Make array of vector coordinates
      p1_s1 = [xcoord_s1[0][0], ycoord_s1[0][0], zcoord_s1[0][0]]
      p2_s1 = [xcoord_s1[0][1], ycoord_s1[0][1], zcoord_s1[0][1]]
      p3_s1 = [xcoord_s1[0][2], ycoord_s1[0][2], zcoord_s1[0][2]]
  
      NL1 = nodelable[0]
      NL2 = nodelable[1]
      NL3 = nodelable[2]
  
  # print('LABEL INITIAL=', pt1Partlabel, pt2Partlabel, pt3Partlabel)
  print('LABEL NA STEP', NL1, NL2, NL3)
  print('step coordinates = ', p1_s1, p2_s1,p3_s1 )
  </code></pre>
  <p>However, when I run the code it prints empty rows. When I replace the line</p>
  <pre><code>center = odb.rootAssembly.nodeSets[SetsScrewsLeft[j]]
  </code></pre>
  <p>with</p>
  <pre><code>center = odb.rootAssembly.nodeSets[&quot;Screw['L5_L']&quot;]
  </code></pre>
  <p>It prints all the coordinates correctly, so p1_s1, p2_s1, p3_s1 and NL1, NL2, NL3. Thus my code works for one nodeset, but not for a bunch (my loop). I figured there must be something wrong with my loop. Can anyone help me with correcting my loop?</p>