rybose
Mechanical
- Dec 15, 2008
- 32
Hello all,
I am looking to access the .FIL file instead of going through the .ODB. The Abaqus documentation says that each entry is 8 bytes long whether it's a string, float, or integer.
I am trying to used the struct module to convert the binary. I am unsure what format to use to read 8 byte integers.
For a first step I am simply trying to print the record length and record type key - the first 16 bytes of each entry.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
import struct
sFileName = 'shellMeshStatic.fil'
f = open(sFileName,'rb')
for x in f.readlines():
q = struct.unpack('<qq',x[0:16])
print q, len(x)
f.close()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I seem to be getting garbage. Has anyone done this before? Any help would be great.
-Ryan
I am looking to access the .FIL file instead of going through the .ODB. The Abaqus documentation says that each entry is 8 bytes long whether it's a string, float, or integer.
I am trying to used the struct module to convert the binary. I am unsure what format to use to read 8 byte integers.
For a first step I am simply trying to print the record length and record type key - the first 16 bytes of each entry.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
import struct
sFileName = 'shellMeshStatic.fil'
f = open(sFileName,'rb')
for x in f.readlines():
q = struct.unpack('<qq',x[0:16])
print q, len(x)
f.close()
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
I seem to be getting garbage. Has anyone done this before? Any help would be great.
-Ryan