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!

Python: How to work in the current ODB file?

Status
Not open for further replies.

RGX124

Mechanical
Apr 5, 2005
75
Hi,
I am writing a Python program in order to work on the current odb file.
I would like to know how to specify that it should use the current (already opened) odb file, in order to avoid to specify the path of the file in the command :eek:db= session.odbs[...].

Do you know the command I should include in the Python file in order not to write a program for each odb file?

See below for the beginning of the Python file.

from abaqus import *
from abaqusConstants import *
import visualization
import xyPlot
import displayGroupOdbToolset as dgo
session.viewports['Viewport: 1'].view.setValues(session.views['Front'])
session.viewports['Viewport: 1'].view.setProjection(projection=PARALLEL)
odb= session.odbs['/local/rkler/Documents/PUF2008/Flexion3pts/flexion3pts-module-C3D20R-Si-iso.odb']
session.xyDataListFromField(odb=odb, outputPosition=NODAL, variable=(('RF',
NODAL, ((COMPONENT, 'RF2'), )), ('U', NODAL, ((COMPONENT, 'U2'), )), ),
nodePick=(('COUTEAU-4', 1, ('[#0:10 #1 ]', )), ), )
...
..
.


Thanks

Rage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor