Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

How to write the Frame description in a text file ?

Status
Not open for further replies.

Eleo

Mechanical
Mar 2, 2015
26
How to write the frame description, Step Time and Time increment in a text file ?
I tried the following code but it does not work.

file = open("/directory/newfile.txt","w")
for frame in odb.steps['Step-1'].frames:
displacement = frame.fieldOutputs['PHILSM']
for y in displacement.values:
file.write('%6.4f, %6.4f,%6.4f \n ' % (frame.description[0],
frame.description[1], y.data))
 
Replies continue below

Recommended for you

In general: When you want to know what option you have based on a certain object, go into CAE/Viewer Python interpreter and print it out.

So open you odb in CAE and enter (with your odb name):
Code:
print session.odbs['Job-1.odb'].steps['Step-1'].frames[2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor