Abaqus python scripting - stencil created in .mdb not available in .odb
I created a set of items in the root assembly in the .mdb file:
a = mdb.models['Model-1'].rootAssembly els_1 = a.instances['Part-1'].elements Coh_els = els_1.getByBoundingBox(x1 y1 z1 x2 y2 z2) a.Set(elements=Coh_els, name='COHELSET-0')
I'm trying to access the pins of the fields in this item set in the .odb file:
coh_els = odb.rootAssembly.instances['PART-1'].elementSets['COHELSET-0']
But I am getting "KeyError: COHELSET-0" (the itemset does not appear in the .odb model tree), so I cannot access the output of the field in that collection.
The rest of my code works when I use the stencil that is visible in the tree, so I know the problem is accessing the predefined stencil.
Can someone please explain to me what I am doing wrong?
+3
source to share