Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple script error

Status
Not open for further replies.

DanStro

Mechanical
Dec 11, 2004
393
I am trying to write a script that creates some XY data from node sets in an odb. Using the rpy file I came up with the script below. But when I try to run it I am getting an error that the name "COMPONENT" doesn't exist. As far as I can tell, from both the rpy file and the scripting section of the help docs, this is correct. In case it matters the error is flagged on the line where I am defining 'var'.

Can anyone point me to what I am doing wrong?

Python:
import odbAccess

odb = session.odbs['E:/AbaqusWork/_Practice/Scripting/SurfNodeReport/jbSurfNodeReport.odb']

var=(('COORD', NODAL, ((COMPONENT, 'COOR2'), )), )
session.xyDataListFromField(odb=odb, outputPosition=NODAL, variable=var, nodeSets=("PART-1-1.BOTTOM", ))

print('done')

Thanks,
Dan

 
Replies continue below

Recommended for you

Second component of COORD variable should be COORD2, not COOR2.
 
According to the .rpy and help file it is COOR2 for the component of COORD.

I figured out what I was doing wrong and just in case someone else in the future has the same problem here is what I did to fix it: The problem that I was having is because I was not importing abaqusConstants, that contains the definition of COMPONENT. Once I added that import it works fine.

Dan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor