title: ABAQUS scripting, boundary conditions on reference point
body: <p>I've created a reference point and applied boundary condition to it in Abaqus GUI, but when I copied text for these commands from .rpy file to my script and run it I've got the message:</p>
  <pre><code>File &quot;C:/...../script.py&quot;, line 110 in &lt;module&gt; refPoints1=(r1[8], )  KeyError:8
  </code></pre>
  <p>The code is as follows:</p>
  <pre><code>#Here is code for creation of reference point:
  a = mdb.models['Model-1'].rootAssembly
  e11 = a.instances['Part-1-1'].edges
  a.ReferencePoint(point=a.instances['Part-1-1'].InterestingPoint(edge=e11[1], 
      rule=MIDDLE))
  #Here is code for boundary condition assignment:
  a = mdb.models['Model-1'].rootAssembly
  r1 = a.referencePoints
  refPoints1=(r1[8], )
  region = a.Set(referencePoints=refPoints1, name='Set-1')
  mdb.models['Model-1'].DisplacementBC(name='BC-1', createStepName='Initial', 
      region=region, u1=SET, u2=SET, u3=UNSET, ur1=UNSET, ur2=UNSET, ur3=UNSET, 
      amplitude=UNSET, distributionType=UNIFORM, fieldName='', localCsys=None)
  </code></pre>
  <p>What is the problem?</p>
  <p>Why the code written by Abaqus throws an exception when re-run from an external script?</p>