I'm trying to write a field output report from the odb file. I keep getting a IOError, which I have no idea where is the problem of my script. Hope you guys can help on this!
This is the script I have for writing the field output report
o1 = session.openOdb(name='R:\ABAQUS\Job-5.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=o1)
odb = session.odbs['R:\ABAQUS\Job-5.odb']
session.writeFieldReport(fileNmae = 'abaqus.rpt', append = OFF, sortItem = "Node Label",
odb = odb, step = 2, frame = 50, outputPosition = NODAL,
variable = (('CNORMF ASSEMBLY_DROP-SURF/ASSEMBLY_PART2INSTANCE_SURF-1',NODAL, ((INVARIANT, 'Magnitude'),)),))
odb.close()
This is the error that I get:
*Starting main file [Kernel]: r:/ABAQUS/readOutput.py
Traceback (most recent call last):
File "r:/ABAQUS/readOutput.py", line 27, in <module>
NODAL, ((INVARIANT, 'Magnitude'),)),))
IOError: IOError: Empty filename
Exit from main file [Kernel]: r:/ABAQUS/readOutput.py
I referred to my .rpy file for another odb file, which i did the exact same procedure, and the code is shown below. I ran this script and it works and writes the field report successfully.It does not throw this Empty filename error. However, when I use the same code for my other odb file, it throws that error.
o1 = session.openOdb(name='C:/Temp/Job-14.odb')
session.viewports['Viewport: 1'].setValues(displayedObject=o1)
#: Model: C:/Temp/Job-14.odb
#: Number of Assemblies: 1
#: Number of Assembly instances: 0
#: Number of Part instances: 2
#: Number of Meshes: 2
#: Number of Element Sets: 5
#: Number of Node Sets: 6
#: Number of Steps: 2
#session.animationController.setValues(animationType=TIME_HISTORY, viewports=(
#'Viewport: 1', ))
#session.animationController.play(duration=UNLIMITED)
#session.animationController.setValues(animationType=NONE)
#session.viewports['Viewport: 1'].odbDisplay.setFrame(step=1, frame=20)
odb = session.odbs['C:/Temp/Job-14.odb']
session.writeFieldReport(fileName='abaqus.rpt', append=OFF,
sortItem='Node Label', odb=odb, step=1, frame=20, outputPosition=NODAL,
variable=(('CNORMF ASSEMBLY_M_SURF-8/ASSEMBLY_S_SURF-8', NODAL, ((
INVARIANT, 'Magnitude'), )), ))
odb.close()
Hope you guys can give me some clues !! Thank you!