python - Warning of NameError for wireType in ABAQUS -
i tried connect points through wires using script. warning regarding nameerror occurred.
the code tried run in abaqus:
a = mdb.models['model-1'].rootassembly v11 = a.instances['r-mesh-2'].vertices v12 = a.instances['s-mesh-1'].vertices v13 = a.instances['r-mesh-1'].vertices v14 = a.instances['s-mesh-1-lin-2-1'].vertices a.wirepolyline(points=((v11.findat(coordinates=(2.595, 0.22, -35.7)), v12.findat(coordinates=(2.595, 0.2, -35.7))), (v11.findat(coordinates=( 2.445, 0.22, -35.7)), v12.findat(coordinates=(2.445, 0.2, -35.7))), ( v13.findat(coordinates=(1.095, 0.22, -35.7)), v12.findat(coordinates=( 1.095, 0.2, -35.7))), (v13.findat(coordinates=(0.945, 0.22, -35.7)), v12.findat(coordinates=(0.945, 0.2, -35.7))), (v11.findat(coordinates=( 2.595, 0.22, -35.1)), v14.findat(coordinates=(2.595, 0.2, -35.1)))), mergetype=imprint, meshable=off) = mdb.models['model-1'].rootassembly e1 = a.edges edges1 = e1.findat(((2.595, 0.215, -35.1), ), ((0.945, 0.215, -35.7), ), (( 1.095, 0.215, -35.7), ), ((2.445, 0.215, -35.7), ), ((2.595, 0.215, -35.7), )) a.set(edges=edges1, name='wire-1-set-1')
here's error: nameerror: name 'imprint' not defined
another time purposefully changed part of code 'mergetype='imprint', error becomes: typeerror: mergetype; found string, expecting imprint, merge or separate
how solve problem?
thanks
the module giving error expecting constant module. import module necessary constants:
from abaqusconstants import *
then use mergetype=imprint, ...
doing. or avoid polluting namespace , alias instead:
import abaqusconstants ac
and use mergetype=ac.imprint, ...
.
Comments
Post a Comment