×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Abaqus Python - Extract number of steps/frames

Abaqus Python - Extract number of steps/frames

Abaqus Python - Extract number of steps/frames

(OP)
I am writing a code in which I need to set a variable to the number of steps and another to the number of frames.
I will then use that to iterate through the steps in viewer and take screenshots. I've looked through the manual and can't find anything that will help me get this, plus I don't really understand the code structure for abaqus yet.
Best,
- Clay

RE: Abaqus Python - Extract number of steps/frames

Try that and modify as needed.

CODE --> Python

from abaqus import *
from abaqusConstants import *
from caeModules import *

vps = session.viewports[session.currentViewportName]

odbName = vps.displayedObject.name
odb = session.odbs[odbName]
currentstepnumber = vps.odbDisplay.fieldFrame[0]
currentstepname = odb.steps.keys()[currentstepnumber]
currentframe = vps.odbDisplay.fieldFrame[1]
currentsteptime = odb.steps[currentstepname].frames[currentframe].frameValue

print odbName
print currentstepnumber
print currentstepname
print currentframe
print currentsteptime 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources